-
Notifications
You must be signed in to change notification settings - Fork 8
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
updates to webpack4 #77
Conversation
includes required linting changes to pass build and tests
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.
Thanks @christopher-johnson ! This looks great to me. I really like how you list out the changes individually in the PR.
One quick question, should the development build (running npm start) get the development environment?
minimal_redux_poc/package.json
Outdated
"start": "NODE_ENV=development npm run build && concurrently \"npm run build:watch\" \"npm run server -- -p 4444\"" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" |
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.
How does this work with the .eslintrc
file which extends airbnb
. Should that just be an array and specified there?
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.
eslint will read both config from .eslintrc
and the package.json
. I agree that it would be cleaner to put that in the .eslintrc
.
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.
Gotcha. Do you mind making that small change 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.
it turns out that eslint does not read the package.json if there is an .eslintrc
. if it had, then eslint-config-react-app
(as well as eslint-plugin-flowtype
) would have been required as a dependencies. this is a useful extension for accessibility checks, so I do not think that there is a downside to adding it here. note, however, that it is entirely optional.
about the dev mode and dev server in the start script, this still needs some work. It is fairly typical to have a separate webpack config for development and the dev server, and this can be done in another PR. currently, the start script has an extra |
8b005f0
to
0cc6618
Compare
adds mode to build scripts
0cc6618
to
2da6fd4
Compare
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.
Thanks for breaking this out @christopher-johnson. We reviewed this today in the POC session and appreciate your work on upgrading to webpack 4. We did see a few things that we would like to update, so will likely tackle that as a team in our pairing session.
Thanks again! 🥂
closes #76
babel-preset-react-app
includes bothpreset-env
andpreset-react
(among others) as a bundle.import
andmodule.exports
is no longer allowed in an ES6 module. (ref changes in index.js)react/destructuring-assignment
"no-console": "off"
rule to.eslintrc
as console log statements are typical with node.paths.js
which includes path resolvers and aliases for scripts.NODE_ENV
to script defs in package.json.