EliotPu / webpack-boilerplate

A webpack 5 boilerplate for building web apps (SPA/MPA) with Babel, CSS Modules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack boilerplate

Important!

For correct build via Webpack you must have:

  • nodejs >=16.13.1
  • npm >= 7.10.0

Tech stack

  • javascript Javascript
  • html HTML
  • CSS CSS
  • ES6 ES6
  • babel Babel
  • eslint eslint
  • CSS Modules CSS Modules
  • Markdown Markdown

To start project:

First you need to install the dependencies:

  • npm install - install the required dependencies.

Then, for start project in production mode

  • npm run start - build the project in "production" mode and run "static-server".

Or, for start project in development mode

  • npm run develop - run "WebpackDevServer".

Note: Versions required by the project are specified in package.json in the engines field

To build project:

npm run build:prod build the project in "production" mode ('./dist/' output folder). npm run build:dev build the project in "development" mode ('./dist/' output folder).

To run server (static):

npm run static-server - run "static-server".

To run linter:

npm run lint - run 'eslint'. npm run lint:fix run 'eslint' with fixes.

Clean up distribution:

npm run clean - run 'rimraf' (delete folder dist).

Babel:

Babel documentation.

Eslint:

Eslint documentation.

Css Modules:

See documentation and topics below:

Author

Eliot Purouski purouskieliot@gmail.com

About

A webpack 5 boilerplate for building web apps (SPA/MPA) with Babel, CSS Modules

License:ISC License


Languages

Language:JavaScript 99.2%Language:HTML 0.8%