Skip to content

Conversation

@JohnsonHuang4396
Copy link
Contributor

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

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@JohnsonHuang4396
Copy link
Contributor Author

Found this is no need ToT

@ycs77
Copy link
Contributor

ycs77 commented Nov 13, 2023

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?

@ycs77
Copy link
Contributor

ycs77 commented Nov 13, 2023

And now the ant-design-vue latest version is v4, could you set the importStyle default to CSSinJS?

@JohnsonHuang4396
Copy link
Contributor Author

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?🧐

@ycs77
Copy link
Contributor

ycs77 commented Nov 14, 2023

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. 🤔

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

Successfully merging this pull request may close these issues.

3 participants