0.2.0 • Published 5 years ago
webpack-boilerplate-bargamut v0.2.0
📦 Webpack Boilerplate via Bargamut
Webpack boilerplate with Babel, PostCSS, dev server with HMR and an optimized production build.
Installation
git clone git@github.com:bargamut/webpack-boilerplate-bargamut
cd webpack-boilerplate-bargamut
npm ior
git clone git@github.com:bargamut/webpack-boilerplate-bargamut my-project
cd my-project
npm iUsage
Development server
npm startYou can view the development server at localhost:8080.
Production build
npm run buildFeatures
Dependencies
webpack
webpack- Module and asset bundler.webpack-cli- Command line interface for webpackwebpack-dev-server- Development server for webpackwebpack-merge- Simplify development/production configuration
Babel
@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/preset-react- Smart defaults for React
Loaders
babel-loader- Transpile files with Babel and webpackpostcss-loader- Process CSS with PostCSSpostcss-preset-env- Sensible defaults for PostCSS
css-loader- Resolve CSS importsstyle-loader- Inject CSS into the DOM
Plugins
clean-webpack-plugin- Remove/clean build folderscopy-webpack-plugin- Copy files to build directorycss-minimizer-webpack-plugin- Optimize and minimize CSS assetshtml-webpack-plugin- Generate HTML files from templatemini-css-extract-plugin- Extract CSS into separate filesterser-webpack-plugin- Optimize and minimize JavaScript
Author
License
This project is open source and available under the MIT License.