@umijs/mfsu 4.0.7 → 4.0.8

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.
Files changed (67) hide show
  1. package/dist/babelPlugins/awaitImport/MFImport.d.ts +0 -0
  2. package/dist/babelPlugins/awaitImport/MFImport.js +59 -66
  3. package/dist/babelPlugins/awaitImport/awaitImport.d.ts +1 -1
  4. package/dist/babelPlugins/awaitImport/awaitImport.js +103 -117
  5. package/dist/babelPlugins/awaitImport/checkMatch.d.ts +0 -0
  6. package/dist/babelPlugins/awaitImport/checkMatch.js +18 -3
  7. package/dist/babelPlugins/awaitImport/getAliasedPath.d.ts +0 -0
  8. package/dist/babelPlugins/awaitImport/getAliasedPath.js +54 -35
  9. package/dist/babelPlugins/awaitImport/getRealPath.d.ts +0 -0
  10. package/dist/babelPlugins/awaitImport/getRealPath.js +42 -21
  11. package/dist/babelPlugins/awaitImport/isExternals.d.ts +0 -0
  12. package/dist/babelPlugins/awaitImport/isExternals.js +55 -26
  13. package/dist/babelPlugins/awaitImport/parseSpecifiers.d.ts +0 -0
  14. package/dist/babelPlugins/awaitImport/parseSpecifiers.js +51 -52
  15. package/dist/constants.d.ts +0 -0
  16. package/dist/constants.js +47 -10
  17. package/dist/dep/dep.d.ts +0 -0
  18. package/dist/dep/dep.js +0 -0
  19. package/dist/dep/getCJSExports.d.ts +0 -0
  20. package/dist/dep/getCJSExports.js +60 -53
  21. package/dist/dep/getExposeFromContent.d.ts +0 -0
  22. package/dist/dep/getExposeFromContent.js +71 -59
  23. package/dist/dep/getModuleExports.d.ts +0 -0
  24. package/dist/dep/getModuleExports.js +58 -32
  25. package/dist/depBuilder/depBuilder.d.ts +0 -0
  26. package/dist/depBuilder/depBuilder.js +0 -0
  27. package/dist/depBuilder/getESBuildEntry.d.ts +0 -0
  28. package/dist/depBuilder/getESBuildEntry.js +35 -12
  29. package/dist/depInfo.d.ts +0 -0
  30. package/dist/depInfo.js +0 -0
  31. package/dist/esbuildHandlers/autoCssModules.d.ts +0 -0
  32. package/dist/esbuildHandlers/autoCssModules.js +0 -0
  33. package/dist/esbuildHandlers/awaitImport/index.d.ts +0 -0
  34. package/dist/esbuildHandlers/awaitImport/index.js +82 -70
  35. package/dist/index.d.ts +0 -0
  36. package/dist/index.js +32 -22
  37. package/dist/loader/esbuild.d.ts +0 -0
  38. package/dist/loader/esbuild.js +87 -35
  39. package/dist/mfsu/mfsu.d.ts +1 -1
  40. package/dist/mfsu/mfsu.js +0 -0
  41. package/dist/mfsu/strategyCompileTime.d.ts +0 -0
  42. package/dist/mfsu/strategyCompileTime.js +0 -0
  43. package/dist/mfsu/strategyStaticAnalyze.d.ts +0 -0
  44. package/dist/mfsu/strategyStaticAnalyze.js +0 -0
  45. package/dist/moduleGraph.d.ts +0 -0
  46. package/dist/moduleGraph.js +0 -0
  47. package/dist/staticDepInfo/importParser.d.ts +0 -0
  48. package/dist/staticDepInfo/importParser.js +28 -6
  49. package/dist/staticDepInfo/simulations/babel-plugin-import.d.ts +0 -0
  50. package/dist/staticDepInfo/simulations/babel-plugin-import.js +0 -0
  51. package/dist/staticDepInfo/staticDepInfo.d.ts +0 -0
  52. package/dist/staticDepInfo/staticDepInfo.js +0 -0
  53. package/dist/types.d.ts +0 -0
  54. package/dist/types.js +33 -8
  55. package/dist/utils/makeArray.d.ts +0 -0
  56. package/dist/utils/makeArray.js +29 -5
  57. package/dist/utils/trimFileContent.d.ts +0 -0
  58. package/dist/utils/trimFileContent.js +29 -5
  59. package/dist/webpackPlugins/buildDepPlugin.d.ts +0 -0
  60. package/dist/webpackPlugins/buildDepPlugin.js +49 -25
  61. package/dist/webpackPlugins/depChunkIdPrefixPlugin.d.ts +0 -0
  62. package/dist/webpackPlugins/depChunkIdPrefixPlugin.js +44 -19
  63. package/dist/webpackPlugins/stripSourceMapUrlPlugin.d.ts +0 -0
  64. package/dist/webpackPlugins/stripSourceMapUrlPlugin.js +46 -27
  65. package/dist/webpackPlugins/writeCachePlugin.d.ts +0 -0
  66. package/dist/webpackPlugins/writeCachePlugin.js +39 -15
  67. package/package.json +6 -6
@@ -1,10 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getESBuildEntry = void 0;
4
- const constants_1 = require("../constants");
5
- // from typescript `esModuleInterop`
6
- const ES_INTEROP_FUNC = `__exportStar`;
7
- const ES_INTEROP_HELPER = `
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // getESBuildEntry.ts
20
+ var getESBuildEntry_exports = {};
21
+ __export(getESBuildEntry_exports, {
22
+ getESBuildEntry: () => getESBuildEntry
23
+ });
24
+ module.exports = __toCommonJS(getESBuildEntry_exports);
25
+ var import_constants = require("../constants");
26
+ var ES_INTEROP_FUNC = `__exportStar`;
27
+ var ES_INTEROP_HELPER = `
8
28
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
29
  if (k2 === undefined) k2 = k;
10
30
  Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
@@ -17,7 +37,7 @@ var ${ES_INTEROP_FUNC} = (this && this.__exportStar) || function(m, exports) {
17
37
  };
18
38
  `;
19
39
  function getESBuildEntry(opts) {
20
- return `
40
+ return `
21
41
  (function() {
22
42
  /******/ "use strict";
23
43
  /******/ var __webpack_modules__ = ({});
@@ -282,7 +302,7 @@ var __webpack_exports__ = {};
282
302
  var exports = __webpack_exports__;
283
303
  ${ES_INTEROP_HELPER}
284
304
  var moduleMap = {
285
- ${opts.deps.map(getDepModuleStr).join(',\n')}
305
+ ${opts.deps.map(getDepModuleStr).join(",\n")}
286
306
  };
287
307
  var get = function(module, getScope) {
288
308
  __webpack_require__.R = getScope;
@@ -313,12 +333,11 @@ ${opts.deps.map(getDepModuleStr).join(',\n')}
313
333
  })();
314
334
  `;
315
335
  }
316
- exports.getESBuildEntry = getESBuildEntry;
317
336
  function getDepModuleStr(dep) {
318
- return `
337
+ return `
319
338
  "./${dep.file}": function() {
320
339
  return new Promise(resolve => {
321
- import('./${constants_1.MF_VA_PREFIX}${dep.normalizedFile}.js').then(module => {
340
+ import('./${import_constants.MF_VA_PREFIX}${dep.normalizedFile}.js').then(module => {
322
341
  module.default && ${ES_INTEROP_FUNC}(module, module.default);
323
342
  resolve(() => module.default || module);
324
343
  });
@@ -326,3 +345,7 @@ function getDepModuleStr(dep) {
326
345
  }
327
346
  `.trim();
328
347
  }
348
+ // Annotate the CommonJS export names for ESM import in node:
349
+ 0 && (module.exports = {
350
+ getESBuildEntry
351
+ });
package/dist/depInfo.d.ts CHANGED
File without changes
package/dist/depInfo.js CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -1,74 +1,86 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getImportHandlerV4 = void 0;
4
- const checkMatch_1 = require("../../babelPlugins/awaitImport/checkMatch");
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // index.ts
20
+ var awaitImport_exports = {};
21
+ __export(awaitImport_exports, {
22
+ default: () => getAwaitImportHandler,
23
+ getImportHandlerV4: () => getImportHandlerV4
24
+ });
25
+ module.exports = __toCommonJS(awaitImport_exports);
26
+ var import_checkMatch = require("../../babelPlugins/awaitImport/checkMatch");
5
27
  function getImportHandlerV4(params) {
6
- return function awaitImportHandler(opts) {
7
- let offset = 0;
8
- let { code } = opts;
9
- const { imports } = opts;
10
- imports.forEach((i) => {
11
- if (!i.n)
12
- return;
13
- const isLazyImport = i.d > 0;
14
- const from = i.n;
15
- const replaceValue = params.resolveImportSource(from);
16
- if (replaceValue !== from) {
17
- // case: import x from './index.ts';
18
- // import('./index.ts');
19
- // import x from '
20
- // import(
21
- const preSeg = code.substring(0, i.s + offset);
22
- // ';
23
- // );
24
- const tailSeg = code.substring(i.e + offset);
25
- const quote = isLazyImport ? '"' : '';
26
- code = `${preSeg}${quote}${replaceValue}${quote}${tailSeg}`;
27
- offset += replaceValue.length - from.length;
28
- }
29
- });
30
- return code;
31
- };
28
+ return function awaitImportHandler(opts) {
29
+ let offset = 0;
30
+ let { code } = opts;
31
+ const { imports } = opts;
32
+ imports.forEach((i) => {
33
+ if (!i.n)
34
+ return;
35
+ const isLazyImport = i.d > 0;
36
+ const from = i.n;
37
+ const replaceValue = params.resolveImportSource(from);
38
+ if (replaceValue !== from) {
39
+ const preSeg = code.substring(0, i.s + offset);
40
+ const tailSeg = code.substring(i.e + offset);
41
+ const quote = isLazyImport ? '"' : "";
42
+ code = `${preSeg}${quote}${replaceValue}${quote}${tailSeg}`;
43
+ offset += replaceValue.length - from.length;
44
+ }
45
+ });
46
+ return code;
47
+ };
32
48
  }
33
- exports.getImportHandlerV4 = getImportHandlerV4;
34
49
  function getAwaitImportHandler(params) {
35
- return function awaitImportHandler(opts) {
36
- var _a, _b;
37
- let offset = 0;
38
- let { code } = opts;
39
- const { filePath, imports } = opts;
40
- imports.forEach((i) => {
41
- if (!i.n)
42
- return;
43
- const isLazyImport = i.d > 0;
44
- const from = i.n;
45
- const { isMatch, replaceValue } = (0, checkMatch_1.checkMatch)({
46
- cache: params.cache,
47
- value: from,
48
- opts: params.opts,
49
- filename: filePath,
50
- });
51
- if (isMatch) {
52
- // case: import x from './index.ts';
53
- // import('./index.ts');
54
- // import x from '
55
- // import(
56
- const preSeg = code.substring(0, i.s + offset);
57
- // ';
58
- // );
59
- const tailSeg = code.substring(i.e + offset);
60
- const quote = isLazyImport ? '"' : '';
61
- code = `${preSeg}${quote}${replaceValue}${quote}${tailSeg}`;
62
- offset += replaceValue.length - from.length;
63
- }
64
- });
65
- if (params.cache.has(filePath)) {
66
- (_b = (_a = params.opts).onCollect) === null || _b === void 0 ? void 0 : _b.call(_a, {
67
- file: filePath,
68
- data: params.cache.get(filePath),
69
- });
70
- }
71
- return code;
72
- };
50
+ return function awaitImportHandler(opts) {
51
+ var _a, _b;
52
+ let offset = 0;
53
+ let { code } = opts;
54
+ const { filePath, imports } = opts;
55
+ imports.forEach((i) => {
56
+ if (!i.n)
57
+ return;
58
+ const isLazyImport = i.d > 0;
59
+ const from = i.n;
60
+ const { isMatch, replaceValue } = (0, import_checkMatch.checkMatch)({
61
+ cache: params.cache,
62
+ value: from,
63
+ opts: params.opts,
64
+ filename: filePath
65
+ });
66
+ if (isMatch) {
67
+ const preSeg = code.substring(0, i.s + offset);
68
+ const tailSeg = code.substring(i.e + offset);
69
+ const quote = isLazyImport ? '"' : "";
70
+ code = `${preSeg}${quote}${replaceValue}${quote}${tailSeg}`;
71
+ offset += replaceValue.length - from.length;
72
+ }
73
+ });
74
+ if (params.cache.has(filePath)) {
75
+ (_b = (_a = params.opts).onCollect) == null ? void 0 : _b.call(_a, {
76
+ file: filePath,
77
+ data: params.cache.get(filePath)
78
+ });
79
+ }
80
+ return code;
81
+ };
73
82
  }
74
- exports.default = getAwaitImportHandler;
83
+ // Annotate the CommonJS export names for ESM import in node:
84
+ 0 && (module.exports = {
85
+ getImportHandlerV4
86
+ });
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
@@ -1,23 +1,33 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
15
8
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.esbuildLoader = void 0;
18
- __exportStar(require("./constants"), exports);
19
- __exportStar(require("./esbuildHandlers/autoCssModules"), exports);
20
- // for independent use `esbuild-loader`
21
- var esbuild_1 = require("./loader/esbuild");
22
- Object.defineProperty(exports, "esbuildLoader", { enumerable: true, get: function () { return esbuild_1.esbuildLoader; } });
23
- __exportStar(require("./mfsu/mfsu"), exports);
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ esbuildLoader: () => import_esbuild.esbuildLoader
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ __reExport(src_exports, require("./constants"), module.exports);
27
+ __reExport(src_exports, require("./esbuildHandlers/autoCssModules"), module.exports);
28
+ var import_esbuild = require("./loader/esbuild");
29
+ __reExport(src_exports, require("./mfsu/mfsu"), module.exports);
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ esbuildLoader
33
+ });
File without changes
@@ -1,38 +1,90 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.esbuildLoader = void 0;
4
- const es_module_lexer_1 = require("@umijs/bundler-utils/compiled/es-module-lexer");
5
- const esbuild_1 = require("@umijs/bundler-utils/compiled/esbuild");
6
- const path_1 = require("path");
7
- async function esbuildTranspiler(source) {
8
- var _a;
9
- const done = this.async();
10
- const options = this.getOptions();
11
- const { handler = [], implementation, ...otherOptions } = options;
12
- const transform = (implementation === null || implementation === void 0 ? void 0 : implementation.transform) || esbuild_1.transform;
13
- const filePath = this.resourcePath;
14
- const ext = (0, path_1.extname)(filePath).slice(1);
15
- const transformOptions = {
16
- ...otherOptions,
17
- target: (_a = options.target) !== null && _a !== void 0 ? _a : 'es2015',
18
- loader: ext !== null && ext !== void 0 ? ext : 'js',
19
- sourcemap: this.sourceMap,
20
- sourcefile: filePath,
21
- };
22
- try {
23
- let { code, map } = await transform(source, transformOptions);
24
- if (handler.length) {
25
- await es_module_lexer_1.init;
26
- handler.forEach((handle) => {
27
- const [imports, exports] = (0, es_module_lexer_1.parse)(code);
28
- code = handle({ code, imports, exports, filePath });
29
- });
30
- }
31
- done(null, code, map && JSON.parse(map));
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
32
31
  }
33
- catch (error) {
34
- done(error);
32
+ return target;
33
+ };
34
+ var __export = (target, all) => {
35
+ for (var name in all)
36
+ __defProp(target, name, { get: all[name], enumerable: true });
37
+ };
38
+ var __copyProps = (to, from, except, desc) => {
39
+ if (from && typeof from === "object" || typeof from === "function") {
40
+ for (let key of __getOwnPropNames(from))
41
+ if (!__hasOwnProp.call(to, key) && key !== except)
42
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
+ }
44
+ return to;
45
+ };
46
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
47
+
48
+ // esbuild.ts
49
+ var esbuild_exports = {};
50
+ __export(esbuild_exports, {
51
+ default: () => esbuild_default,
52
+ esbuildLoader: () => esbuildLoader
53
+ });
54
+ module.exports = __toCommonJS(esbuild_exports);
55
+ var import_es_module_lexer = require("@umijs/bundler-utils/compiled/es-module-lexer");
56
+ var import_esbuild = require("@umijs/bundler-utils/compiled/esbuild");
57
+ var import_path = require("path");
58
+ async function esbuildTranspiler(source) {
59
+ const done = this.async();
60
+ const options = this.getOptions();
61
+ const _a = options, { handler = [], implementation } = _a, otherOptions = __objRest(_a, ["handler", "implementation"]);
62
+ const transform = (implementation == null ? void 0 : implementation.transform) || import_esbuild.transform;
63
+ const filePath = this.resourcePath;
64
+ const ext = (0, import_path.extname)(filePath).slice(1);
65
+ const transformOptions = __spreadProps(__spreadValues({}, otherOptions), {
66
+ target: options.target ?? "es2015",
67
+ loader: ext ?? "js",
68
+ sourcemap: this.sourceMap,
69
+ sourcefile: filePath
70
+ });
71
+ try {
72
+ let { code, map } = await transform(source, transformOptions);
73
+ if (handler.length) {
74
+ await import_es_module_lexer.init;
75
+ handler.forEach((handle) => {
76
+ const [imports, exports] = (0, import_es_module_lexer.parse)(code);
77
+ code = handle({ code, imports, exports, filePath });
78
+ });
35
79
  }
80
+ done(null, code, map && JSON.parse(map));
81
+ } catch (error) {
82
+ done(error);
83
+ }
36
84
  }
37
- exports.default = esbuildTranspiler;
38
- exports.esbuildLoader = __filename;
85
+ var esbuild_default = esbuildTranspiler;
86
+ var esbuildLoader = __filename;
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ esbuildLoader
90
+ });
@@ -13,7 +13,7 @@ interface IOpts {
13
13
  mfName?: string;
14
14
  mode?: Mode;
15
15
  tmpBase?: string;
16
- unMatchLibs?: string[];
16
+ unMatchLibs?: Array<string | RegExp>;
17
17
  runtimePublicPath?: boolean | string;
18
18
  implementor: typeof webpack;
19
19
  buildDepWithESBuild?: boolean;
package/dist/mfsu/mfsu.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,8 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // @ts-ignore
4
- const _importParser_js_1 = require("../../vendors/importParser/_importParser.js");
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // importParser.ts
20
+ var importParser_exports = {};
21
+ __export(importParser_exports, {
22
+ default: () => parse
23
+ });
24
+ module.exports = __toCommonJS(importParser_exports);
25
+ var import_importParser = require("../../vendors/importParser/_importParser.js");
5
26
  function parse(code) {
6
- return (0, _importParser_js_1.parse)(code);
27
+ return (0, import_importParser.parse)(code);
7
28
  }
8
- exports.default = parse;
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {});
File without changes
File without changes
package/dist/types.d.ts CHANGED
File without changes
package/dist/types.js CHANGED
@@ -1,8 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Mode = void 0;
4
- var Mode;
5
- (function (Mode) {
6
- Mode["development"] = "development";
7
- Mode["production"] = "production";
8
- })(Mode = exports.Mode || (exports.Mode = {}));
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // types.ts
20
+ var types_exports = {};
21
+ __export(types_exports, {
22
+ Mode: () => Mode
23
+ });
24
+ module.exports = __toCommonJS(types_exports);
25
+ var Mode = /* @__PURE__ */ ((Mode2) => {
26
+ Mode2["development"] = "development";
27
+ Mode2["production"] = "production";
28
+ return Mode2;
29
+ })(Mode || {});
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ Mode
33
+ });
File without changes
@@ -1,7 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeArray = void 0;
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // makeArray.ts
20
+ var makeArray_exports = {};
21
+ __export(makeArray_exports, {
22
+ makeArray: () => makeArray
23
+ });
24
+ module.exports = __toCommonJS(makeArray_exports);
4
25
  function makeArray(item) {
5
- return Array.isArray(item) ? item : [item];
26
+ return Array.isArray(item) ? item : [item];
6
27
  }
7
- exports.makeArray = makeArray;
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ makeArray
31
+ });
File without changes
@@ -1,7 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trimFileContent = void 0;
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // trimFileContent.ts
20
+ var trimFileContent_exports = {};
21
+ __export(trimFileContent_exports, {
22
+ trimFileContent: () => trimFileContent
23
+ });
24
+ module.exports = __toCommonJS(trimFileContent_exports);
4
25
  function trimFileContent(content) {
5
- return content.trim() + '\n';
26
+ return content.trim() + "\n";
6
27
  }
7
- exports.trimFileContent = trimFileContent;
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ trimFileContent
31
+ });
File without changes