Skip to content

Webpack 4 boilterplate with Babel, SASS, PostCSS, Vue, Tailwind and Pug

Notifications You must be signed in to change notification settings

guillaumebriday/webpack-boilerplate

Repository files navigation

Static HTML pages with Webpack

Donate

Features

  • Write modern CSS with PostCSS and SCSS
  • Write modern JS with Babel and Vue
  • Preconfigured TailwindCSS for rapidly building custom designs
  • Automatic copying of Pug templates and static assets from src to dist folders
  • Linter for scripts
  • Hot reload with webpack-dev-server
  • Build transpiled, bundled, autoprefixed, minificated and compressed files for production
  • Support environment variables in .env file
  • Remove unused CSS with PurgeCSS

Usage

  • Write all your ES2015+ Javascript code in src/js and SCSS styling in src/style. Store static files in public.
  • Every Pug pages in src/views will generate an html page with the same name.

In development

Start the webpack-dev-server on http://localhost:8080:

$ yarn hot

Build the application in development mode:

$ yarn development

Recompile whenever files change:

$ yarn watch

Lint your code:

$ yarn lint

In production

Prepare the app for production in dist folder:

$ yarn production

Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

License

This project is released under the MIT license.