A barebone eleventy and webpack template. Fork and go.
- Barebone eleventy (literally 😱)
- Fast build with per env configs (babel-env, postcss-preset-env, webpack...)
.js(ES6, Babel and its polyfills).css(Sass, Autoprefixer)- Prettier for formatting
Live demo https://eleventy-webpack.netlify.app
First install the dependencies:
npm installThen you can:
| Command | Description |
|---|---|
npm run start |
Run your website on http://localhost:8080 |
npm run build |
Build your production website inside /dist |
npm run format |
Run prettier on all filles except /dist |
npm run analyze |
Output info on your bundle size |
That's it.
Webpack is used when:
- Any changes to
assets/scriptsorassets/stylesis watched and rebuilt by webpack. - The new files are appended to the ignored file
_includes/webpack.njkthanks to html-webpack-plugin. - Eleventy sees the new
_includes/webpack.njkand rebuild.
Any other changes is picked up normally by Eleventy (see .eleventy.js)
