xhs-mp-pack 2.0.8 → 2.0.9
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/Watching.js +1 -0
- package/package.json +4 -4
- package/dist/base/commonjs.d.ts +0 -1
- package/dist/base/commonjs.js +0 -48
package/dist/Watching.js
CHANGED
|
@@ -248,6 +248,7 @@ class Watching {
|
|
|
248
248
|
return this.handler(err, null);
|
|
249
249
|
}
|
|
250
250
|
console.log('trigger watch', changedFiles, removedFiles, fileTimeInfoEntries, contextTimeInfoEntries);
|
|
251
|
+
// macos 上展开目录也会触发变化,这里拦一下
|
|
251
252
|
if (changedFiles) {
|
|
252
253
|
changedFiles.delete(this.compiler.project.projectPath);
|
|
253
254
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xhs-mp-pack",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "xhs mp compiler core.",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"category": "esm",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"watchpack": "^2.4.0",
|
|
56
56
|
"webpack-chain": "^6.5.1",
|
|
57
57
|
"webpack-sources": "^3.2.3",
|
|
58
|
-
"xhs-mp-compiler-utils": "2.0.
|
|
59
|
-
"xhs-mp-project": "2.0.
|
|
60
|
-
"xhs-mp-shared-fs": "2.0.
|
|
58
|
+
"xhs-mp-compiler-utils": "2.0.9",
|
|
59
|
+
"xhs-mp-project": "2.0.9",
|
|
60
|
+
"xhs-mp-shared-fs": "2.0.9"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/babel__generator": "7.6.3",
|
package/dist/base/commonjs.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getRuntimeCode(): string;
|
package/dist/base/commonjs.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRuntimeCode = void 0;
|
|
4
|
-
function getRuntimeCode() {
|
|
5
|
-
const code = `
|
|
6
|
-
if (!globalThis.__XHS_RUNTIME_REGISTERED__) {
|
|
7
|
-
globalThis.__XHS_RUNTIME_REGISTERED__ = true;
|
|
8
|
-
globalThis.require = function(p) {
|
|
9
|
-
var path = require.resolve(p);
|
|
10
|
-
var mod = require.modules[path];
|
|
11
|
-
if (!mod) throw new Error('failed to require "' + p + '"');
|
|
12
|
-
if (!mod.exports) {
|
|
13
|
-
mod.exports = {};
|
|
14
|
-
mod.call(mod.exports, mod, mod.exports, require.relative(path));
|
|
15
|
-
}
|
|
16
|
-
return mod.exports;
|
|
17
|
-
}
|
|
18
|
-
require.modules = {};
|
|
19
|
-
require.resolve = function (path){
|
|
20
|
-
var orig = path;
|
|
21
|
-
var reg = path + '.js';
|
|
22
|
-
var index = path + '/index.js';
|
|
23
|
-
return require.modules[reg] && reg
|
|
24
|
-
|| require.modules[index] && index
|
|
25
|
-
|| orig;
|
|
26
|
-
};
|
|
27
|
-
require.register = function (path, fn){
|
|
28
|
-
require.modules[path] = fn;
|
|
29
|
-
};
|
|
30
|
-
require.relative = function (parent) {
|
|
31
|
-
return function(p){
|
|
32
|
-
if ('.' != p.charAt(0)) return require(p);
|
|
33
|
-
var path = parent.split('/');
|
|
34
|
-
var segs = p.split('/');
|
|
35
|
-
path.pop();
|
|
36
|
-
for (var i = 0; i < segs.length; i++) {
|
|
37
|
-
var seg = segs[i];
|
|
38
|
-
if ('..' == seg) path.pop();
|
|
39
|
-
else if ('.' != seg) path.push(seg);
|
|
40
|
-
}
|
|
41
|
-
return require(path.join('/'));
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
return code;
|
|
47
|
-
}
|
|
48
|
-
exports.getRuntimeCode = getRuntimeCode;
|