javascriptwebpackwebpack.config.jsnpm-build

Webpack : from webpack.config.js to webpack.dev.js


I have a question regarding webpack config files.

I'm new at this technology.

So far everything was working well until I changed the name of the webpack.config.js file to webpack.dev.js.

Now the js in the dist folder do not updated when I edit the index.js file.

Can someone have a clue ?

Here is my repository where there is all the file : https://github.com/mln95/udacity-question

Thank you for your help.

Best regards,

Mohamed.


Solution

  • This should work like this - add the name of the config file in the build command.

    "scripts": {
      "build": "webpack --config prod.config.js"
    }
    

    Source: https://webpack.js.org/configuration/

    Happy coding!