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

extractStyle开启后页面卡死 #38

Open
beijin1949 opened this issue Jan 25, 2024 · 4 comments
Open

extractStyle开启后页面卡死 #38

beijin1949 opened this issue Jan 25, 2024 · 4 comments

Comments

@beijin1949
Copy link

设置为true后,在app.vue使用如下代码



刷新页面后确实会渲染出来,但是在点击按钮后,执行弹窗
const handleMessage = () => {
message.info("This is a normal message");
}
这种会直接卡死服务器并且报错500

@aibayanyu20
Copy link
Member

https://github.com/antdv-community/antdv-nuxt-starter fork一下提交一个复现看看吧

@robertyclin
Copy link

https://github.com/antdv-community/antdv-nuxt-starter fork一下提交一个复现看看吧

请问该项目的nuxt.config.ts配置了vite的有关配置是有什么用的,我直接vite配置注释后,发现会加载很多文件,从原来的10M增加到30M。
vite: {
resolve: {
alias: {
'ant-design-vue/dist': 'ant-design-vue/dist',
'ant-design-vue/es': 'ant-design-vue/es',
'ant-design-vue/lib': 'ant-design-vue/es',
'ant-design-vue': 'ant-design-vue/es',
},
},
},

@aibayanyu20
Copy link
Member

antdv-community/antdv-nuxt-starter fork一下提交一个复现看看吧

请问该项目的nuxt.config.ts配置了vite的有关配置是有什么用的,我直接vite配置注释后,发现会加载很多文件,从原来的10M增加到30M。 vite: { resolve: { alias: { 'ant-design-vue/dist': 'ant-design-vue/dist', 'ant-design-vue/es': 'ant-design-vue/es', 'ant-design-vue/lib': 'ant-design-vue/es', 'ant-design-vue': 'ant-design-vue/es', }, }, },

保证 tree-shaking

@robertyclin
Copy link

antdv-community/antdv-nuxt-starter fork一下提交一个复现看看吧

请问该项目的nuxt.config.ts配置了vite的有关配置是有什么用的,我直接vite配置注释后,发现会加载很多文件,从原来的10M增加到30M。 vite: { resolve: { alias: { 'ant-design-vue/dist': 'ant-design-vue/dist', 'ant-design-vue/es': 'ant-design-vue/es', 'ant-design-vue/lib': 'ant-design-vue/es', 'ant-design-vue': 'ant-design-vue/es', }, }, },

保证 tree-shaking

这个能否在文档说明下呢,把vite的配置加上

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

3 participants