Webpack 4 basic setup with watch, dev server, css/scss, html, file loaders and plugins included.
- In-depth explanation in the wiki
cd path-to-your-project
npm install
npm i -g ntl
- By running ntl you can choose which script to run. For example start, build, build:prod and watch will be some of the choices. All of these scripts are in the
package.json
file in the scripts object. - Command to start ntl and choose an option
ntl
If you don't want to use ntl you can use the npm run
command with the chosen script, examples:
- For development bundle
npm run build
- For production ready bundle
npm run build:prod
- For development server
npm start
- For Webpack watch
npm run watch
- webpack
- dev-server
- Clean Webpack plugin -- clean-plugin-wp -- clean-plugin-git
- HTML loader --html-loader-wp -- html-loader-git
- HTML plugin -- html-plugin-wp -- html-plugin-git
- Extract text plugin -- extract-text-plugin-wp -- extract-text-plugin-git
- CSS loader -- css-loader-wp -- css-loader-git
- PostCSS loader -- postcss-loader-wp -- postcss-loader-git
- Autoprefixer -- autoprefixer-git
- SASS loader -- sass-loader-wp -- sass-loader-git
- Style loader -- style-loader-wp -- style-loader-git
- Url loader -- url-loader-wp -- url-loader-git
- File loader -- file-loader-wp -- file-loader-git
- Dotenv plugin -- dotenv-webpack
- Copy plugin -- copy-plugin-git
- Source maps -- source-maps
MIT