-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGAPP-602: Setup basic ts project web #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I start reviewing this, should we base this on main?
Hmm. Not Sure about that as it seems the build config files already have a *.ts ending, but don't compile. This would definitely create issue with the ci. Or did you mean changing the base branch to Main without any change from web-ts-init? |
I think the latter, otherwise reviewing is quite hard if you don't remember what we were doing on the conference already here. |
Should web-ts-init also be merged? Should we open a PR for it? |
I'd just review it together as |
a59ef30
to
1601880
Compare
Some files have been autogenerated by create-react-app (README.md, App.css, ...) I guess. Should I remove them or keep them for now? Furthermore I recommend checking this branch out and clicking around. A lot of the changes still encompass the www folder |
web-ts/package.json
Outdated
"npm": ">=3.8" | ||
}, | ||
"scripts": { | ||
"start": "cross-env TS_NODE_PROJECT=\"tools/tsconfig.webpack.json\" webpack-dev-server --config tools/webpack.config.ts --progress --env.config_name=integreat-test-cms --env.dev_server", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cross-env TS_NODE_PROJECT=\"tools/tsconfig.webpack.json\"
most ugly workaround for webpack.config.ts
Read more here in the webpack-docu or this webpack-cli issue
@@ -0,0 +1,295 @@ | |||
import {Configuration, DefinePlugin, LoaderOptionsPlugin, optimize} from "webpack"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay typescript 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, can we have prettier/linting as well? 😁 Or is this something we should rather do in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate PR I think. We also do not have it in the flow project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we want it in the flow project?
@@ -0,0 +1,27 @@ | |||
{ | |||
"compilerOptions": { | |||
"target": "ES2020", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one we could discuss. On IGAPP-web-ts-init
it was set to esnext, which is at least in my opinion not a stable form of release. In our current web project we use es6(=es2015) syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ES2020
is fine for now 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this config will support IE11, but I'd just leave this and see some time later what to choose here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean here. Probably we will have to stay with es6, as previously. Check out Caniuse.com.
I think you could remove those files, less to review for us and less changes at a later point. |
🎉 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work 👍 Highway to typescript 🚀
@@ -0,0 +1,295 @@ | |||
import {Configuration, DefinePlugin, LoaderOptionsPlugin, optimize} from "webpack"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate PR I think. We also do not have it in the flow project.
@@ -0,0 +1,27 @@ | |||
{ | |||
"compilerOptions": { | |||
"target": "ES2020", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this config will support IE11, but I'd just leave this and see some time later what to choose here.
This pull request belongs to an issue on our bugtracker.
You can find it there by looking for an issue with the key which is mentioned in the title of this pull request.
It starts with the keyword IGAPP.
index.ejs
could be found without any issues