1.6.0 • Published 1 year ago

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

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

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

@0y0/webpack-config-react is a common webpack config for React.

Installation

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

Usage

const createWebpackConfig = require('@0y0/webpack-config-react')
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

1.6.0

1 year ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago