pro-mern-stack
pro-mern-stack copied to clipboard
Libraries Bundle - npm run watch - deprecation notice
Running the "npm run watch" command could cause an error. Pay attention to the notes in the error as seen blow
Error: Deprecation notice: CommonsChunkPlugin now only takes a single argument. Either an options object or the name of the chunk. Example: if your old code looked like this: new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js') You would change it to: new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.bundle.js' })
After making the changes in the above statement, I now receive a 404 error on both app.bundle.js and vendor.bundle.js.
This occurred both in the copy that I was developing, and from a copy that I pulled from github (and making the aforementioned changes to the CommonsChunkPlugin. I am unsure of where to go from here.
I am very new to all of this so use the suggestion with caution, it may come down to my installation being a different version.. likely newer than what is installed in the book. That change did work for me though, specifically in the "Libraries Bundle" section in chapter 7. If you are doing it an earlier point etc that may be the reason it is not working.
Justin it depends on the version webpack you have installed in your package.json file. Vasan is using webpack 1.
were you able to resolve your issue?