Closed JohnsonHuang4396 closed 2 months ago
Run & review this pull request in StackBlitz Codeflow.
Found this is no need ToT
I upgraded to ant-design-vue v4 and had an error:
[vite]: Rollup failed to resolve import "ant-design-vue/es/config-provider/style/css" from "D:/src/App.vue?vue&type=
script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
Now I using the less
import style to fix it temporarily:
AntDesignVueResolver({
importStyle: 'less',
}),
I think this PR could fix it, @JohnsonHuang4396 could you reopen it?
And now the ant-design-vue latest version is v4, could you set the importStyle
default to CSSinJS
?
I'm glad that this PR is helpful to you, but I think the CSSinJS option is exactly the same as the Less option, just with different name. But I can't figure out a better way, so I closed this PR. Maybe you could give me some clue?🧐
Thanks for the response. I think that although the functionality is the same, the option value still has meaning to the user. Just like for package users "less" and "CSSinJS" are different. 🤔
Description
Support Ant-Design Vue 4.x
Previously, AntDesignVueResolver could only import CSS files, but now supports the introduction of CSS inJS files
Linked Issues
Additional context