-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
โญ๏ธ bugSomething isn't workingSomething isn't working
Description
ๆ้ฎๅๅ ็็๏ผ
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
๐ bug ๆ่ฟฐ
ๅจไฝฟ็จ Rspack๏ผๆ ViteใWebpack 5 + "type": "module"๏ผ็ญไธฅๆ ผ ESM ๅ ผๅฎน็ๆๅปบๅทฅๅ ทๆถ๏ผ้กน็ฎๆๅปบๅคฑ่ดฅใ
@ant-design/pro-components/es/index.js ไธญ็ๅฏผๅบ่ฏญๅฅๆชๅ
ๅซ .js ๆฉๅฑๅ๏ผไฝๅจ็ฐไปฃ ESM ่ง่ไธ๏ผๅฐคๅ
ถๆฏๅฝ package.json ๅซ "type": "module" ๆไฝฟ็จ .mjs ๆถ๏ผ๏ผๆๆๅฏผๅ
ฅ่ทฏๅพๅฟ
้กปๆฏ ๅฎๆดๆๅฎ๏ผfully specified๏ผ ็๏ผๅณๅบๅไธบ๏ผ
export * from "./card/index.js";
export * from "./layout/index.js";๐ท ๅค็ฐๆญฅ้ชค
ๅ็บงๅฐ 3.0.1-0 https://www.npmjs.com/package/@ant-design/pro-components/v/3.0.1-0 ๅไปฅไธ็ๆฌๅฟ ๅฎ้็ฐ
๐ ๆๆ็ปๆ
@ant-design/pro-components ็ ESM ่พๅบๅบๅ
ผๅฎนๆ ๅ ESM ็ฏๅข๏ผๆฏๆๅจ RspackใVite ็ญๅทฅๅ
ทไธญๅผ็ฎฑๅณ็จใ
๐ป ๅค็ฐไปฃ็
ยฉ ็ๆฌไฟกๆฏ
- ProComponents ็ๆฌ: [e.g. 3.1.3-1]
- umi ็ๆฌ: [ไธไฝฟ็จumi]
- ๆต่งๅจ็ฏๅข: [ๆๆ็ฏๅข]
- ๅผๅ็ฏๅข [e.g. Win 11 + Node.js 24 LTS + pnpm + RSPack 1.7.4]
๐ ๅ ถไปไฟกๆฏ
ๆงๅถๅฐ่พๅบ
WARNING in ./src/layouts/Default/index.tsx 33:14-24
โ ESModulesLinkingWarning: export 'getMenuData' (imported as 'getMenuData') was not found in '@ant-design/pro-components' (module has no exports)
โญโ[33:13]
31 โ let t0;
32 โ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
33 โ t0 = getMenuData(menu, {
ยท โโโโโโโโโโโ
34 โ locale: false
35 โ });
โฐโโโโ
WARNING in ./src/layouts/Default/index.tsx 138:36-44
โ ESModulesLinkingWarning: export 'ProLayout' (imported as 'ProLayout') was not found in '@ant-design/pro-components' (module has no exports)
โญโ[138:35]
136 โ let t8;
137 โ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
138 โ t8 = /*#__PURE__*/ _jsxDEV(ProLayout, {
ยท โโโโโโโโโ
139 โ title: "Ant Design Pro",
140 โ logo: "https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",
โฐโโโโ
WARNING in ./src/pages/Welcome/index.tsx 97:36-48
โ ESModulesLinkingWarning: export 'PageContainer' (imported as 'PageContainer') was not found in '@ant-design/pro-components' (module has no exports)
โญโ[97:35]
95 โ let t2;
96 โ if ($[5] !== styles.welcomeDiv || $[6] !== t0 || $[7] !== t1) {
97 โ t2 = /*#__PURE__*/ _jsxDEV(PageContainer, {
ยท โโโโโโโโโโโโโ
98 โ children: /*#__PURE__*/ _jsxDEV(ProCard, {
99 โ children: /*#__PURE__*/ _jsxDEV("div", {
โฐโโโโ
WARNING in ./src/pages/Welcome/index.tsx 98:45-51
โ ESModulesLinkingWarning: export 'ProCard' (imported as 'ProCard') was not found in '@ant-design/pro-components' (module has no exports)
โญโ[98:44]
96 โ if ($[5] !== styles.welcomeDiv || $[6] !== t0 || $[7] !== t1) {
97 โ t2 = /*#__PURE__*/ _jsxDEV(PageContainer, {
98 โ children: /*#__PURE__*/ _jsxDEV(ProCard, {
ยท โโโโโโโ
99 โ children: /*#__PURE__*/ _jsxDEV("div", {
100 โ className: styles.welcomeDiv,
โฐโโโโ
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 1:1-23
ร Module not found: Can't resolve './card' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[1:0]
1 โ export * from "./card";
ยท โโโโโโโโโโโโโโโโโโโโโโโ
2 โ export * from "./descriptions";
3 โ export * from "./field";
โฐโโโโ
help: Did you mean './card\index.js'?
The request './card' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 2:1-31
ร Module not found: Can't resolve './descriptions' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[2:0]
1 โ export * from "./card";
2 โ export * from "./descriptions";
ยท โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
3 โ export * from "./field";
4 โ export * from "./form";
โฐโโโโ
help: Did you mean './descriptions\index.js'?
The request './descriptions' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 3:1-24
ร Module not found: Can't resolve './field' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[3:0]
1 โ export * from "./card";
2 โ export * from "./descriptions";
3 โ export * from "./field";
ยท โโโโโโโโโโโโโโโโโโโโโโโโ
4 โ export * from "./form";
5 โ export * from "./layout";
โฐโโโโ
help: Did you mean './field\index.js'?
The request './field' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 4:1-23
ร Module not found: Can't resolve './form' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[4:0]
2 โ export * from "./descriptions";
3 โ export * from "./field";
4 โ export * from "./form";
ยท โโโโโโโโโโโโโโโโโโโโโโโ
5 โ export * from "./layout";
6 โ export * from "./list";
โฐโโโโ
help: Did you mean './form\index.js'?
The request './form' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 5:1-25
ร Module not found: Can't resolve './layout' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[5:0]
3 โ export * from "./field";
4 โ export * from "./form";
5 โ export * from "./layout";
ยท โโโโโโโโโโโโโโโโโโโโโโโโโ
6 โ export * from "./list";
7 โ export * from "./provider";
โฐโโโโ
help: Did you mean './layout\index.js'?
The request './layout' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 6:1-23
ร Module not found: Can't resolve './list' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[6:0]
4 โ export * from "./form";
5 โ export * from "./layout";
6 โ export * from "./list";
ยท โโโโโโโโโโโโโโโโโโโโโโโ
7 โ export * from "./provider";
8 โ export * from "./skeleton";
โฐโโโโ
help: Did you mean './list\index.js'?
The request './list' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 7:1-27
ร Module not found: Can't resolve './provider' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[7:0]
5 โ export * from "./layout";
6 โ export * from "./list";
7 โ export * from "./provider";
ยท โโโโโโโโโโโโโโโโโโโโโโโโโโโ
8 โ export * from "./skeleton";
9 โ export * from "./table";
โฐโโโโ
help: Did you mean './provider\index.js'?
The request './provider' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 8:1-27
ร Module not found: Can't resolve './skeleton' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[8:0]
6 โ export * from "./list";
7 โ export * from "./provider";
8 โ export * from "./skeleton";
ยท โโโโโโโโโโโโโโโโโโโโโโโโโโโ
9 โ export * from "./table";
10 โ export * from "./utils";
โฐโโโโ
help: Did you mean './skeleton\index.js'?
The request './skeleton' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 9:1-24
ร Module not found: Can't resolve './table' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[9:0]
7 โ export * from "./provider";
8 โ export * from "./skeleton";
9 โ export * from "./table";
ยท โโโโโโโโโโโโโโโโโโโโโโโโ
10 โ export * from "./utils";
11 โ export { version } from "./version";
โฐโโโโ
help: Did you mean './table\index.js'?
The request './table' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/.pnpm/@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd/node_modules/@ant-design/pro-components/es/index.js 10:1-24
ร Module not found: Can't resolve './utils' in 'D:\project\antd-pro\node_modules\.pnpm\@ant-design+pro-components@_2b666173c5245209f9b5260b18c8dccd\node_modules\@ant-design\pro-components\es'
โญโ[10:0]
8 โ export * from "./skeleton";
9 โ export * from "./table";
10 โ export * from "./utils";
ยท โโโโโโโโโโโโโโโโโโโโโโโโ
11 โ export { version } from "./version";
โฐโโโโ
help: Did you mean './utils\index.js'?
The request './utils' failed to resolve only because it was resolved as fully specified,
probably because the origin is strict EcmaScript Module,
e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Rspack compiled with 10 errors and 4 warnings in 3.18 s
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
โญ๏ธ bugSomething isn't workingSomething isn't working