@wzyjs/cli 0.1.3 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,8 @@ exports.default = (cli) => {
|
|
|
23
23
|
}
|
|
24
24
|
// 合并用户配置
|
|
25
25
|
const productionConfig = (0, utils_1.getProductionConfig)(root);
|
|
26
|
+
(0, utils_1.replaceContentInFile)(process.cwd() + '/tsconfig.json', '"extends": "./src/.umi/tsconfig.json",', '');
|
|
27
|
+
(0, utils_1.replaceContentInFile)(process.cwd() + '/tsconfig.json', '"./src/.umi/typings"', '');
|
|
26
28
|
console.info('正在打包前端代码...');
|
|
27
29
|
const feBuild = await (0, utils_1.executePromise)((0, umi_1.run)({
|
|
28
30
|
presets: [require.resolve('../../plugins/preset')],
|
|
@@ -37,7 +39,6 @@ exports.default = (cli) => {
|
|
|
37
39
|
(0, utils_1.writeConfig)(outDir, productionConfig);
|
|
38
40
|
console.info('正在打包后端代码...', root);
|
|
39
41
|
try {
|
|
40
|
-
(0, utils_1.replaceContentInFile)(process.cwd() + '/tsconfig.json', '/.umi/', '/.umi-production/');
|
|
41
42
|
const rdBuild = await (0, utils_1.executePromise)((0, utils_1.buildServer)(root, outDir));
|
|
42
43
|
console.info(`打包后端代码成功~ 耗时:` + rdBuild.time / 1000 + 's');
|
|
43
44
|
}
|