A Webpack 5 & Three.js boilerplate together with Babel, Sass, ESLint, Hot Module Replacement and Stylelint, optimized for development/production.
git clone git@github.com:brandflugan/three-js-webpack-boilerplate
npm i
npm startYou can view the development server at localhost:8080.
npm run buildNote: Install http-server globally to deploy a simple server.
npm i -g http-serverYou can view the deploy by creating a server in dist.
cd dist && http-servernpm run fix-jsnpm run fix-stylingThree.js- Three.js framework.
webpack- Module and asset bundler.webpack-cli- Command line interface for Webpack.webpack-dev-server- Development server for Webpack.
@babel/core- Transpile ES6+ to backwards compatible JavaScript.@babel/preset-env- Smart defaults for Babel.babel-eslint- Lint Babel code.babel-polyfill- This will emulate a full ES2015+ environment.eslint- ESLint.
babel-loader- Transpile files with Babel and Webpack.sass-loader- Load SCSS and compile to CSS.node-sass- Node Sass.
postcss-loader- Process CSS with PostCSS.cssnano- Optimize and compress PostCSS.postcss-preset-env- Sensible defaults for PostCSS.
css-loader- Resolves CSS imports into JS.style-loader- Inject CSS into the DOM.file-loader- Copy files to build folder.url-loader- Encode and inline files. Falls back to file-loader.
clean-webpack-plugin- Remove/clean build folders.copy-webpack-plugin- Copy files to build directory.html-webpack-plugin- Generate HTML files from template.stylelint-webpack-plugin- A Stylelint plugin for webpack.
This project is open source and available under the MIT License.