@umijs/mfsu 4.0.63 → 4.0.65

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.
@@ -32,15 +32,22 @@ __export(getExposeFromContent_exports, {
32
32
  getExposeFromContent: () => getExposeFromContent
33
33
  });
34
34
  module.exports = __toCommonJS(getExposeFromContent_exports);
35
+ var import_utils = require("@umijs/utils");
35
36
  var import_assert = __toESM(require("assert"));
36
37
  var import_path = require("path");
37
38
  var import_getModuleExports = require("./getModuleExports");
38
- var import_utils = require("@umijs/utils");
39
39
  async function getExposeFromContent(opts) {
40
+ var _a;
40
41
  const importPath = (0, import_utils.winPath)(opts.filePath);
41
42
  if (opts.filePath && /\.(css|less|scss|sass|stylus|styl)$/.test(opts.filePath)) {
42
43
  return `import '${importPath}';`;
43
44
  }
45
+ if ((_a = opts.filePath) == null ? void 0 : _a.endsWith(".wasm")) {
46
+ return `
47
+ import _ from '${importPath}';
48
+ export default _;
49
+ export * from '${importPath}';`.trim();
50
+ }
44
51
  if (opts.filePath && /\.(json|svg|png|jpe?g|avif|gif|webp|ico|eot|woff|woff2|ttf|txt|text|mdx?)$/.test(
45
52
  opts.filePath
46
53
  )) {
@@ -49,7 +56,7 @@ import _ from '${importPath}';
49
56
  export default _;`.trim();
50
57
  }
51
58
  (0, import_assert.default)(
52
- /(js|jsx|mjs|ts|tsx)$/.test(opts.filePath),
59
+ (0, import_utils.isJavaScriptFile)(opts.filePath),
53
60
  `file type not supported for ${(0, import_path.basename)(opts.filePath)}.`
54
61
  );
55
62
  const { exports, isCJS } = await (0, import_getModuleExports.getModuleExports)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/mfsu",
3
- "version": "4.0.63",
3
+ "version": "4.0.65",
4
4
  "description": "@umijs/mfsu",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/mfsu#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -19,9 +19,9 @@
19
19
  "dependencies": {
20
20
  "enhanced-resolve": "5.9.3",
21
21
  "is-equal": "^1.6.4",
22
- "@umijs/bundler-utils": "4.0.63",
23
- "@umijs/bundler-esbuild": "4.0.63",
24
- "@umijs/utils": "4.0.63"
22
+ "@umijs/utils": "4.0.65",
23
+ "@umijs/bundler-esbuild": "4.0.65",
24
+ "@umijs/bundler-utils": "4.0.65"
25
25
  },
26
26
  "devDependencies": {
27
27
  "is-absolute-url": "^4.0.1",