Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vitepress启动dev正常但是build会出错 #4311

Open
4 tasks done
yinkeli opened this issue Oct 28, 2024 · 1 comment
Open
4 tasks done

vitepress启动dev正常但是build会出错 #4311

yinkeli opened this issue Oct 28, 2024 · 1 comment

Comments

@yinkeli
Copy link

yinkeli commented Oct 28, 2024

Is your feature request related to a problem? Please describe.

在dev启动时会引入node_modules里面包的module目录,但是build时会从commonjs目录引入,当我修改package.json让它从module目录引入时,又会出现另外的问题,SyntaxError: Named export 'BaseCComponent' not found. The requested module '@phoxxxxx' is a CommonJS module, which may not support all module.exports as named exports; 我可以确定这个包目录是vite打包的es模块

Describe the solution you'd like

1

Describe alternatives you've considered

No response

Additional context

No response

Validations

@naico-wang
Copy link

你应该贴出来一些基本的代码。。。这样比较不容易理解。
不过你看一下你dependency是不是正确设置了,我也引用了不少其他package,没发现这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants