Webpack configuration with wepack-dev-server for enviroments development and production
git clone https://github.com/GeDiez/webpack-configuration.git
you need install:
- nodejs
- npm
- SO mac or linux (terminal)
you might clone de repository on your local and getting start:
yarn
ornpm install
you migth modify webpack.dll.js with your common dependencies, the array object has the dependencies that never change like react, redux, react-dom
entry: {
modules: ['react', 'react-dom'],
},
when you have all your dependencies added, run the next command on your terminal:
yarn run webpack:dll or npm run webpack:dll
it will generate two new files on your project
- build/javascript/modules.js
- modules-manifest.json
note: the configuration above is apply only once but if you update some dependencie like react you might run the build again
the following steps let you get a fast and simply webpack configuration to enviroments to both development and production
Have a weppack-dev-server runnign on port 9000 ...
comands for yarn o npm generate a build of webapp folder with our javascripts, css, images, jsx files
yarn run build:webapp
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use git.
This project is licensed under the MIT License - see the LICENSE.md file for details