1.6.0 • Published 1 year ago

@0y0/webpack-config-vanilla v1.6.0

Weekly downloads
4
License
MIT
Repository
github
Last release
1 year ago

@0y0/webpack-config-vanilla · GitHub license npm

@0y0/webpack-config-vanilla is a common webpack config.

Installation

npm install @0y0/webpack-config-vanilla --save-dev

Usage

const createWebpackConfig = require('@0y0/webpack-config-vanilla')
const webpackConfig = createWebpackConfig(options)

Options

NameTypeDefaultDescription
isDevbooleantrueWhether or not development environment
appNamestring (required)Application name
rootDirstring (required)Project directory
srcDirstring{rootDir}/srcSource directory
distDirstring{rootDir}/distDistribution directory
staticDirstring{rootDir}/src/staticStatic directory
jsChunksobject{ app: '{rootDir}/src/index.js' }JS entries
htmlChunksobject{ app: '{rootDir}/src/index.html' }HTML entries
publicPathstring/Public path
assetPathstring/Asset path
serviceWorkerPathstring/sw.jsService worker path
resolveAliasobjectModule aliases. See webpack doc for details
chunkGroupsobjectCache groups config of split chunk plugin. See webpack doc for details
variablesobject{}Global variables
workboxOptionsobjectWorkbox options. See workbox doc for details
useSourceMapbooleanfalseWhether or not enable source map
useWebpackAnalyzerbooleanfalseWhether or not enable webpack-bundle-analyzer plugin
hoststringlocalhostDev server host
portnumber8080Dev server port
proxyobjectDev server proxy. See webpack doc for details

Check out the example app to see more details.

License

MIT