Skip to content

Basic Webpack 4 setup with watch, dev server, babel, clean plugin, CSS/SCSS loaders, html loader...

License

Notifications You must be signed in to change notification settings

martin-corevski/webpack-basics

Repository files navigation


Webpack 4 basics

Webpack 4 basic setup with watch, dev server, css/scss, html, file loaders and plugins included.


Packages installed

  • In-depth explanation in the wiki

Install dependencies

cd path-to-your-project
npm install

Additional 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

Without 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

Resources used

Official docs

Youtube

Medium


License

MIT

Releases

No releases published

Packages

No packages published