Skip to content

A starter frontend boilerplate using Webpack 5, TailwindCSS, SASS, PostCSS, Babel, ESLint, Stylelint, Prettier and more.

License

Notifications You must be signed in to change notification settings

andreivictor/webpack-tailwind-starter

Repository files navigation

Webpack Tailwind Starter

Webpack TailwindCSS

A starter frontend boilerplate using Webpack 5, TailwindCSS, SASS, PostCSS, Babel, ESLint, Stylelint, Prettier and more.

Features

Webpack

Babel

TailwindCSS / SASS / PostCSS

  • @tailwindcss/typography - A plugin that adds a set of prose classes that can be used to quickly add sensible typographic styles to content blocks.
  • @tailwindcss/forms - A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
  • SASS support based on dart-sass.
  • PostCSS setup with post-preset-env, including autoprefixing of browserspecific CSS rules.

Code style & linters

Optimization

Additional tools

Usage

Development server

npm start

Runs the app in the development mode with hot reloading enabled.
Open http://localhost:8080 or server port specified in your .env file to view it in your browser.

Production build

npm run build

Builds the app for production to the dist folder.
The build is minified and the filenames include hashes.

Code style linters

npm run lint

Runs both SASS and Javascript code linters.

SASS

npm run css-lint

Javascript

npm run js-lint

Code formatting

npm run prettier:format

Runs code formatting with Prettier.

Bundle analyzer

npm run analyze

Builds the app for production and creates an interactive treemap visualization of the contents of all your bundles.
It will start an HTTP server on the default configuration URL localhost:8888 to show bundle report.

Requirements

  • node: >=18
  • npm: >=8