xhs-mp-compiler-cli 1.1.5 → 1.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.
- package/dist/compiler.d.ts +3 -2
- package/dist/compilerCP.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/packs/mp-pack/index.d.ts +1 -1
- package/dist/packs/mp-pack/index.js +1 -5
- package/dist/presets/configs/miniprogram/render/index.js +4 -5
- package/dist/presets/configs/miniprogram/service/index.js +4 -5
- package/dist/utils/project.d.ts +1 -0
- package/dist/utils/zip.d.ts +1 -0
- package/package.json +6 -6
package/dist/compiler.d.ts
CHANGED
package/dist/compilerCP.js
CHANGED
|
@@ -44,7 +44,7 @@ const handlers = {
|
|
|
44
44
|
scene: data.scene
|
|
45
45
|
}, (err, stats) => {
|
|
46
46
|
var _a;
|
|
47
|
-
console.log('file change...');
|
|
47
|
+
console.log('file change...', err, stats);
|
|
48
48
|
// 修改文件时构建
|
|
49
49
|
const hasError = err || ((_a = stats === null || stats === void 0 ? void 0 : stats.hasErrors) === null || _a === void 0 ? void 0 : _a.call(stats));
|
|
50
50
|
if (hasError) {
|
|
@@ -55,7 +55,7 @@ const handlers = {
|
|
|
55
55
|
}
|
|
56
56
|
sendToMaster('compileFinishWhenFileChange');
|
|
57
57
|
}));
|
|
58
|
-
console.log('it is watching...');
|
|
58
|
+
console.log('it is watching...', err, stats);
|
|
59
59
|
const hasError = err || stats.hasErrors();
|
|
60
60
|
if (hasError) {
|
|
61
61
|
sendToMaster('callback', {
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ exports.createCompiler = void 0;
|
|
|
7
7
|
const presets_1 = require("../../presets");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const xhs_mp_pack_1 = require("xhs-mp-pack");
|
|
10
|
-
const dev_server_1 = __importDefault(require("../webpack/dev-server"));
|
|
11
10
|
const createCompiler = (startConfig) => {
|
|
12
11
|
const { action, enableDevServer } = startConfig;
|
|
13
12
|
const mppack = new xhs_mp_pack_1.MPPack(startConfig);
|
|
@@ -19,13 +18,10 @@ const createCompiler = (startConfig) => {
|
|
|
19
18
|
mpPackConfigs.forEach(config => {
|
|
20
19
|
var _a, _b, _c, _d;
|
|
21
20
|
/* 修改在ide里的node_modules的路径 */
|
|
22
|
-
(_b = (_a = config.resolve) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.push(path_1.default.resolve(__dirname, '
|
|
21
|
+
(_b = (_a = config.resolve) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.push(path_1.default.resolve(__dirname, '../../../../'));
|
|
23
22
|
// cli的node_modules路径
|
|
24
23
|
(_d = (_c = config.resolve) === null || _c === void 0 ? void 0 : _c.modules) === null || _d === void 0 ? void 0 : _d.push(path_1.default.resolve(__dirname, '../../'));
|
|
25
24
|
});
|
|
26
|
-
if (action === 'dev' && enableDevServer) {
|
|
27
|
-
return (0, dev_server_1.default)(compilerOptions);
|
|
28
|
-
}
|
|
29
25
|
mppack.createCompiler(mpPackConfigs);
|
|
30
26
|
return mppack;
|
|
31
27
|
};
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.presetRender = exports.getRenderEntry = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
7
|
const css_1 = __importDefault(require("../../../../utils/css"));
|
|
9
8
|
const getSuffixName_1 = require("../../../../utils/getSuffixName");
|
|
10
9
|
const sjsEntryPlugin_1 = __importDefault(require("./sjsEntryPlugin"));
|
|
@@ -29,10 +28,10 @@ const presetRender = (chain, options) => {
|
|
|
29
28
|
libraryTarget: 'umd',
|
|
30
29
|
uniqueName: 'MpRender',
|
|
31
30
|
},
|
|
32
|
-
cache: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
31
|
+
// cache: {
|
|
32
|
+
// type: 'filesystem',
|
|
33
|
+
// cacheDirectory: path.join(cacheDirectory!, 'render'),
|
|
34
|
+
// },
|
|
36
35
|
module: {
|
|
37
36
|
rule: {
|
|
38
37
|
ml: {
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.presetService = exports.getServiceEntry = void 0;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
7
|
const xhs_mp_pack_1 = require("xhs-mp-pack");
|
|
9
8
|
const serviceChunkPlugin_1 = __importDefault(require("./serviceChunkPlugin"));
|
|
10
9
|
const InjectorPlugin_1 = require("../../../plugins/InjectorPlugin");
|
|
@@ -50,10 +49,10 @@ const presetService = (chain, options) => {
|
|
|
50
49
|
libraryTarget: 'umd',
|
|
51
50
|
uniqueName: 'MpService',
|
|
52
51
|
},
|
|
53
|
-
cache: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
52
|
+
// cache: {
|
|
53
|
+
// type: 'filesystem',
|
|
54
|
+
// cacheDirectory: path.join(cacheDirectory!, 'service'),
|
|
55
|
+
// },
|
|
57
56
|
});
|
|
58
57
|
chain.plugin('InjectorPlugin').use(InjectorPlugin_1.InjectorPlugin, [options]);
|
|
59
58
|
chain.plugin('ServiceChunkPlugin').use(serviceChunkPlugin_1.default, [options]);
|
package/dist/utils/project.d.ts
CHANGED
package/dist/utils/zip.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xhs-mp-compiler-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "xhs mp command tool.",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"category": "esm",
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"webpack-bundle-analyzer": "^4.4.0",
|
|
83
83
|
"webpack-chain": "^6.5.1",
|
|
84
84
|
"webpack-sources": "^3.2.2",
|
|
85
|
-
"xhs-mp-compiler-ml-loader": "1.1.
|
|
86
|
-
"xhs-mp-compiler-utils": "1.1.
|
|
87
|
-
"xhs-mp-pack": "^1.1.
|
|
88
|
-
"xhs-mp-project": "^1.1.
|
|
89
|
-
"xhs-mp-utils": "^1.1.
|
|
85
|
+
"xhs-mp-compiler-ml-loader": "1.1.5",
|
|
86
|
+
"xhs-mp-compiler-utils": "1.1.3",
|
|
87
|
+
"xhs-mp-pack": "^1.1.4",
|
|
88
|
+
"xhs-mp-project": "^1.1.4",
|
|
89
|
+
"xhs-mp-utils": "^1.1.3"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@types/babel__generator": "7.6.3",
|