@0y0/webpack-config-vanilla 中文文档教程
@0y0/webpack-config-vanilla ·
@0y0/webpack-config-vanilla
是一个常见的 webpack 配置。
Installation
npm install @0y0/webpack-config-vanilla --save-dev
Usage
const createWebpackConfig = require('@0y0/webpack-config-vanilla')
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 |
查看示例应用以查看更多详细信息。
License
@0y0/webpack-config-vanilla ·
@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
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
更多
你可能也喜欢
- 6vd-pub-sada 中文文档教程
- @0x706b/diagnostic-languageserver 中文文档教程
- @100tal-seg/seg-react-material-template 中文文档教程
- @2003scape/rsc-server 中文文档教程
- @28stoneconsulting/design-system 中文文档教程
- @37shapes/secrets 中文文档教程
- @667/terraform-ts 中文文档教程
- @8base/web-auth0-auth-client 中文文档教程
- @_giobbi/g-cli-search 中文文档教程
- @a11ycore/puppeteer 中文文档教程