Bare minimum boilerplate featuring Webpack, Babel, basic EJS templating and PostCSS styling, all live-reloadable. Code linting and formatting are provided by ESLint and Prettier.
- Webpack as a bundler
- Babel transcompiler
- Basic EJS templating
- PostCSS with csso minification and "include" import
- Webpack Dev Server live-reloading preview
- ESLint linting and Prettier formatting for code
Clone this repository:
git clone https://github.com/icmx/just-webpack
Go to local saved copy:
cd just-webpack
Install dependencies:
npm install
Launch it on localhost:1337 — happy coding!
npm run watch
All sources are in src
directory, but any path can be easily changed in webpack.config.js.
assets
— almost-compiled binary files like images, icon sets, fonts etc. By default it contains onlyimages
subdirectory.static
— ready and compiled files, like favicons, robots.txt etc.app
— application codeindex.html
— index fileindex.js
— app index fileindex.css
— styles index file
All files will be bundled into HTML, CSS and JS bundles, while assets and static files will be just copied:
Sources (src ) |
Output (dist ) |
---|---|
assets/* |
/assets/* |
static/* |
/* |
index.html |
/index.html |
app (optional), index.js |
/main.min.js , /vendor.min.js |
styles (optional), index.css |
/style.min.css |
There are lots of similar boilerplates already indeed. However, most of them are incredibly bloated by endless dependencies, which may be deprecated, outdated and not even used at all, thus I suppose there should be some really lightweight and easy to use alternative.
Please note that packages choice for Just Webpack not only bare, but also sane — this project is not about making it as small as possible.
- Just Gulp — same project, but gulp-based.
- Just Monorepo — minimal monorepository boilerplate built with NPM workspaces