1.7.0 • Published 6 months ago
@0y0/webpack-config-react v1.7.0
@0y0/webpack-config-react ·
@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
Name | Type | Default | Description |
---|---|---|---|
isDev | boolean | true | Whether or not development environment |
appName | string (required) | Application name | |
rootDir | string (required) | Project directory | |
srcDir | string | {rootDir}/src | Source directory |
distDir | string | {rootDir}/dist | Distribution directory |
staticDir | string | {rootDir}/src/static | Static directory |
jsChunks | object | { app: '{rootDir}/src/index.js' } | JS entries |
htmlChunks | object | { app: '{rootDir}/src/index.html' } | HTML entries |
publicPath | string | / | Public path |
assetPath | string | / | Asset path |
serviceWorkerPath | string | /sw.js | Service worker path |
resolveAlias | object | Module aliases. See webpack doc for details | |
chunkGroups | object | Cache groups config of split chunk plugin. See webpack doc for details | |
variables | object | {} | Global variables |
workboxOptions | object | Workbox options. See workbox doc for details | |
useSourceMap | boolean | false | Whether or not enable source map |
useWebpackAnalyzer | boolean | false | Whether or not enable webpack-bundle-analyzer plugin |
host | string | localhost | Dev server host |
port | number | 8080 | Dev server port |
proxy | object | Dev server proxy. See webpack doc for details |
Check out the example app to see more details.
License
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