fast-vue-multi-pages 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -29,7 +29,7 @@ define(["require", "exports", "tslib", "moment", "lodash"], function (require, e
|
|
29
29
|
if (lodash_1.default.isEmpty(pattern)) {
|
30
30
|
return source.toLocaleString();
|
31
31
|
}
|
32
|
-
if (
|
32
|
+
if (!source) {
|
33
33
|
return null;
|
34
34
|
}
|
35
35
|
return (0, moment_1.default)(source).format(pattern);
|
package/package.json
CHANGED
package/vue/FastBuildOption.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* 获取编译配置的选项配置,配置选项如下:
|
3
3
|
* <br/>
|
4
|
+
* {@link devServer } 本地运行服务器配置参考文档:https://webpack.js.org/configuration/dev-server/#devserver
|
5
|
+
* <br/>
|
4
6
|
* {@link projectTitle } 项目名称
|
5
7
|
* <br/>
|
6
8
|
* {@link projectPagesDir } 项目存储页面的目录地址 默认:src/pages
|
@@ -230,6 +232,10 @@ export declare class FastBuildOption {
|
|
230
232
|
* 编译级别的标签名,默认 build-level
|
231
233
|
*/
|
232
234
|
buildLevelTagName: string;
|
235
|
+
/**
|
236
|
+
* 本地运行服务器配置 https://webpack.js.org/configuration/dev-server/#devserver
|
237
|
+
*/
|
238
|
+
devServer: any;
|
233
239
|
/**
|
234
240
|
* 插入Webpack函数function (config){};
|
235
241
|
*/
|
package/vue/FastBuildOption.js
CHANGED
@@ -4,6 +4,8 @@ exports.FastBuildOption = void 0;
|
|
4
4
|
/**
|
5
5
|
* 获取编译配置的选项配置,配置选项如下:
|
6
6
|
* <br/>
|
7
|
+
* {@link devServer } 本地运行服务器配置参考文档:https://webpack.js.org/configuration/dev-server/#devserver
|
8
|
+
* <br/>
|
7
9
|
* {@link projectTitle } 项目名称
|
8
10
|
* <br/>
|
9
11
|
* {@link projectPagesDir } 项目存储页面的目录地址 默认:src/pages
|
@@ -235,6 +237,10 @@ class FastBuildOption {
|
|
235
237
|
* 编译级别的标签名,默认 build-level
|
236
238
|
*/
|
237
239
|
buildLevelTagName = "build-level";
|
240
|
+
/**
|
241
|
+
* 本地运行服务器配置 https://webpack.js.org/configuration/dev-server/#devserver
|
242
|
+
*/
|
243
|
+
devServer;
|
238
244
|
/**
|
239
245
|
* 插入Webpack函数function (config){};
|
240
246
|
*/
|
package/vue/FastVueMultiPages.js
CHANGED
@@ -76,7 +76,7 @@ class FastVueMultiPages {
|
|
76
76
|
this.removeFile(cacheDir);
|
77
77
|
}
|
78
78
|
const { defineConfig } = require('@vue/cli-service');
|
79
|
-
|
79
|
+
let newConfig = {
|
80
80
|
outputDir: options.projectOutDir,
|
81
81
|
assetsDir: options.projectAssetsDir,
|
82
82
|
productionSourceMap: false,
|
@@ -172,7 +172,11 @@ class FastVueMultiPages {
|
|
172
172
|
options.configureWebpack(config);
|
173
173
|
}
|
174
174
|
}
|
175
|
-
}
|
175
|
+
};
|
176
|
+
if (options.devServer) {
|
177
|
+
newConfig["devServer"] = options.devServer;
|
178
|
+
}
|
179
|
+
return defineConfig(newConfig);
|
176
180
|
}
|
177
181
|
/**
|
178
182
|
* 设置全局变量值
|