Sensible webpack 5 boilerplate using Babel, PostCSS and Sass with a hot dev server and an optimized production build.
- node >= 10.13.0
- yarn or npm
Clone this repo and npm install.
yarn install
yarn run start
You can view the development server at localhost:8080
.
yarn run build
Note: Install http-server globally to deploy a simple server.
yarn add http-server
You can view the deploy by creating a server in dist
.
cd dist && http-server
yarn run check
yarn run lint
yarn run ts-check
yarn run fix-code-style
webpack
- Module and asset bundler.webpack-cli
- Command line interface for webpackwebpack-dev-server
- Development server for webpackwebpack-merge
- Simplify development/production configurationcross-env
- Cross platform configuration
@babel/core
- Transpile ES6+ to backwards compatible JavaScript@babel/plugin-proposal-class-properties
- Use properties directly on a class (an example Babel config)@babel/preset-env
- Smart defaults for Babel@babel/plugin-proposal-optional-chaining
- Transform optional chaining operators into a series of nil checks@babel/plugin-transform-regenerator
- Explode async and generator functions into a state machine.@babel/plugin-transform-runtime
- Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
babel-loader
- Transpile files with Babel and webpacksass-loader
- Load SCSS and compile to CSSsass
- Dart Sass
postcss-loader
- Process CSS with PostCSSpostcss-preset-env
- Sensible defaults for PostCSS
css-loader
- Resolve CSS importsstyle-loader
- Inject CSS into the DOMts-loader
- typescript supportsvg-sprite-loader
- generate svg spritessvgo-loader
- optimisation for svg imagespug-loader
- pug template engine
clean-webpack-plugin
- Remove/clean build folderscopy-webpack-plugin
- Copy files to build directoryhtml-webpack-plugin
- Generate HTML files from templatemini-css-extract-plugin
- Extract CSS into separate filescss-minimizer-webpack-plugin
- Optimize and minimize CSS assets
eslint
- Enforce styleguide across applicationeslint-config-airbnb-base
- Base styleguide to enforce ruleseslint-config-prettier
- Implment prettier ruleseslint-plugin-import
- Implment import ruleseslint-plugin-prettier
- Dependency for prettier usage with ESLinteslint-import-resolver-webpack
- Throw exceptions for import/export in webpackeslint-webpack-plugin
- ESLint configuration for webpackprettier
- Dependency forprettier-webpack-plugin
pluginprettier-webpack-plugin
- Prettier configuration for webpack
- jQuery,
- Fancybox,
- OwlCarousel,
- FlexSlider,
- jquery-selectric,
- jquery.maskedinput,
- NoUiSlider
- WebComponentsJs
This project is open source and available under the MIT License.