|
@@ -33,15 +33,15 @@ const MINI_CONFIGS = {
|
|
|
*
|
|
*
|
|
|
* 说明:
|
|
* 说明:
|
|
|
* - dev (开发版预览): 使用 development 模式,跳过构建(使用 watch 模式的输出)
|
|
* - dev (开发版预览): 使用 development 模式,跳过构建(使用 watch 模式的输出)
|
|
|
- * - experience (体验版): 使用 development 模式,自动构建
|
|
|
|
|
|
|
+ * - experience (体验版): 使用 production 模式,自动构建(体验版=生产环境)
|
|
|
* - production (正式版): 使用 production 模式,自动构建
|
|
* - production (正式版): 使用 production 模式,自动构建
|
|
|
*
|
|
*
|
|
|
* 目录结构:dist/weapp/{mode}/
|
|
* 目录结构:dist/weapp/{mode}/
|
|
|
*/
|
|
*/
|
|
|
function getBuildConfig(config, action) {
|
|
function getBuildConfig(config, action) {
|
|
|
- // 体验版和开发版都使用 development 模式(连接开发环境)
|
|
|
|
|
- // 只有正式版使用 production 模式
|
|
|
|
|
- const mode = (action === 'experience' || action === 'dev') ? 'development' : 'production'
|
|
|
|
|
|
|
+ // 只有开发版使用 development 模式
|
|
|
|
|
+ // 体验版和正式版都使用 production 模式
|
|
|
|
|
+ const mode = action === 'dev' ? 'development' : 'production'
|
|
|
|
|
|
|
|
// 根据模式设置对应的 NODE_ENV
|
|
// 根据模式设置对应的 NODE_ENV
|
|
|
// 这样构建输出目录和上传目录就能匹配了
|
|
// 这样构建输出目录和上传目录就能匹配了
|