1.7.0 • Published 6 months ago

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

Weekly downloads
23
License
MIT
Repository
-
Last release
6 months 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.7.0

6 months ago

1.6.0

2 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago