Skip to content

Commit 99b7bd7

Browse files
committed
update docs
1 parent 87f3573 commit 99b7bd7

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/build/index.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@ npm i mpvue-template-compiler mpvue-loader mpvue-webpack-target postcss-mpvue-wx
7373
你也可以通过指定项目 `.npmrc` 从而在安装过程中的避免设置镜像源。
7474

7575
### 入口和(Entry)
76+
77+
> mpvue-loader 1.0.7+
78+
7679
项目的源代码通过 webpack 配置的 entry 来识别页面入口,示例如下:
7780
``` javascript
7881
{
7982
// ...
8083
entry: {
8184
app: resolve('./src/main.js'), // app 字段被识别为 app 类型
82-
list: resolve('./src/pages/list/main.js'), // 其余字段被识别为 page 类型
83-
page1: resolve('./src/pages/page1/main.js')
85+
'list/main': resolve('./src/pages/list/main.js'), // 其余字段被识别为 page 类型
86+
'page1/main': resolve('./src/pages/page1/main.js')
8487
}
8588
}
8689
```
@@ -239,14 +242,12 @@ require('webpack-dev-middleware-hard-disk')(compiler, {
239242

240243
### 提醒
241244

242-
#### 关闭 sourceMap。
243-
建议关闭 `config/index.js``productionSourceMap` ,因为会造成打包后的总文件过大。
244-
245245
#### 建构中 NODE_ENV 环境配置
246+
246247
最简单的配置环境变量的方式,解决报错程度和是否生成单独的 wxss 等。
247248

248249
```
249-
"build": "NODE_ENV=production gulp build",
250+
process.env.NODE_ENV = 'production'
250251
```
251252

252253
#### 增加 .eslintrc.js 全局白名单

0 commit comments

Comments
 (0)