A minimalist Webpack boilerplate to use the latest JavaScript, compile Sass into CSS, and compile Typescript into JavaScript.
git clone [email protected]:taniarascia/webpack-boilerplate.git
cd webpack-boilerplate
npm install
- Babel - transpile the latest JavaScript
- Html Webpack - generate the
index.html
entry point - Clean Webpack - clean generated
dist
folder - Hot Module Replacement - only reload the part that has changed
- Webpack Dev Server - launch a local server for development
Note: This will not create or affect the
dist
build.
Start development server on localhost:8080
.
Generate dist
folder with app.bundle.js
and index.html
.
Watch for changes without the live dev server.
npm i -D
@babel/core \
@babel/preset-env \
babel-loader \
clean-webpack-plugin \
css-loader \
html-webpack-plugin \
mini-css-extract-plugin \
node-sass \
postcss-loader \
sass-loader \
style-loader \
ts-loader \
typescript \
webpack \
webpack-cli \
webpack-dev-server \