π
Static Webpack Boilerplate Minimal & Modern Webpack Boilerplate for building static sites
Highlights
- Easy to use
- Includes optimized Webpack & Babel configuration
- Perfect Lighthouse score
- Non-blocking CSS & fonts loading
- Friendly errors & warnings
- Ensures clean code with xo & stylelint
- Normalizes default browser style with modern-normalize
- HTML template with social media meta tags
- Targets the latest browsers
- Works offline
File Tree
βββ public # Main folder
β βββ css # Subfolder with css
β β βββ main.css # Main CSS file
β βββ fonts # Subfolder with fonts
β β βββ open-sans-v16-latin-regular.woff # .woff font
β β βββ open-sans-v16-latin-regular.woff2 # .woff2 font
β βββ images # Subfolder with images
β β βββ favicon.png # Favicon
β βββ js # Subfolder with JavaScript
β β βββ main.js # Main (entry) file
β βββ index.html # HTML template
βββ .npmrc # npm config
βββ .stylelintrc # stylelint config
βββ .travis.yml # Travis CI config
βββ package.json # Package config with scripts, list of dependencies etc.
βββ webpack.config.js # Webpack config
βββ babel.config.js # Babel config
Usage
# Install dependencies
$ npm install
# Start webpack-dev-server at port 8080
$ npm start
# Run linters
$ npm test
# Build app for production (gets output in the 'dist' directory)
$ npm run build
Deploying
I recommend to use either Zeit Now or Netlify for hosting your site.
TODO
- HMR
- Testing
Related
License
MIT