You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
This discussion was converted from issue #15961 on February 19, 2024 06:59.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the bug
举例来说: 这个库导出的main和module是同一份文件(es module),且没有设置type=module,理论上这个库的导出规则是不规范的,但vite的模块解析是模拟node的规则,所以在build的时候就出现了报错
希望能够支持自定义扩展的模块解析规则,或者有某些配置可以解决这个问题而我没有注意到?
这是第三方库的截图


这是vite打包报错(运行vite build)

Reproduction
无
Steps to reproduce
No response
System Info
Used Package Manager
pnpm
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions