Skip to content

A basic webpack boilerplate for beginners to start with any project

License

Notifications You must be signed in to change notification settings

arnirjhor/webpack-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpack 3 Boilerplate for beginners

A basic webpack 3 boilerplate for beginners to start with any JS/ES6 based project.

Guide

This basic boilerplate is the final output of this comprehensive write up on Medium. I recommend to read this article to know the insight of how you can configure webpack from scratch. Webpack 3 quickstarter: Configure webpack from scratch

Install dependencies

npm install

Develop locally with webpack-dev-server

  1. Run
npm run dev
  1. In your browser, navigate to: http://localhost:2000/

For bundled output

npm run build

For production-ready output

npm run build:prod

Loaders and Plugins used in this boilerplate

Loaders

  • babel-loader
  • html-loader
  • sass-loader
  • css-loader
  • style-loader
  • file-loader

Plugins

  • clean-webpack-plugin
  • extract-text-webpack-plugin
  • html-webpack-plugin