/webpack-config-jaid

Takes tiny input and returns a Webpack config in the way I personally like.

Primary LanguageJavaScriptMIT LicenseMIT

webpack-config-jaid

License Sponsor webpack-config-jaid
Build status Commits since v17.4.2 Last commit Issues
Latest version on npm Dependents Downloads

Takes tiny input and returns a Webpack config in the way I personally like.

Opinionated

⚠️ This project is tailored to my personal needs and workflows and therefore highly opinionated. Feel free to use it or get inspired by it, but please do not get frustrated if you come across weird features or difficulties integrating it in your own ecosystem.

Pure ESM library

ℹ️ This package has only ESM exports. You should import it from MJS files or read more here.

Installation

webpack-config-jaid on npm

npm install --save-dev webpack-config-jaid@^17.4.2

webpack-config-jaid on Yarn

yarn add --dev webpack-config-jaid@^17.4.2

Usage

Main types:

Type Example Project
adobeCep emote-workflow
cli package-field-cli
githubAction action-npm-install
nodeClass socket-enhance
nodeLib buffer-to-data-url
nodeScript emote-workflow/client
reactDomComponent react-modern-picture
universalClass key-counter
universalLib epoch-seconds
webapp letter.bar

Unused types:

Type Example Project
generatorCorePlugin
executable
html
node

Environment Variables

Following environment variables are read by webpack-config-jaid:

Name Description
browserSync Can be a number that will be used as port for Browser Sync.
debugWebpack If defined, debugging files will be written to dist folder.
GITHUB_WORKFLOW If defined, CI mode will be active which increases script compression rate.
NODE_ENV Used to determine if webpackConfig.mode should be "development" or not.
TRAVIS_TAG If defined, CI mode will be active which increases script compression rate.
webpackDevtool Overwrites webpackConfig.devtool with given value.
webpackPort Port that webpack-dev-server hosts the HMR app on. Same as option devPort.

Development

Development hints for maintaining and improving webpack-config-jaid

Setting up:

git clone git@github.com:jaid/webpack-config-jaid.git
cd webpack-config-jaid
npm install

Testing:

npm run test:dev

Testing in production environment:

npm run test

License

MIT License
Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/jaid)