You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
The init generator executed while running webpack-cli init creates a webpack configuration file and installs the dependencies, I think it could be improved:
There are some unused imports and comments in the generated configuration file
The keys in the configuration object are in a random order, IMO this should be an example of good practices for beginners
The entry point provided by the user is never set in the final configuration file
We check many times a variable isProd that is initialized to false and never updated
The code could be refactored, topScope and webpackOptions are initialized sparsely
When multientry configuration is chosen we suggest naming the entries "app" and "vendor", this seems to be discouraged in v4
What is the expected behavior?
generate some boilerplate too (eg. generate the entry point in src/index.js)
cleaner code
cleaner configuration with ordered keys
I think this would benefit the programmatic usage too.
I'm already working on this, please let me know any opinion and if you think there's something else that can be improved :)
The text was updated successfully, but these errors were encountered:
misterdev
changed the title
Init generator could be improved
Init generator improvements
Mar 31, 2019
What is the current behavior?
The init generator executed while running
webpack-cli init
creates a webpack configuration file and installs the dependencies, I think it could be improved:false
and never updatedtopScope
andwebpackOptions
are initialized sparselyWhat is the expected behavior?
src/index.js
)I think this would benefit the programmatic usage too.
I'm already working on this, please let me know any opinion and if you think there's something else that can be improved :)
The text was updated successfully, but these errors were encountered: