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

EXP | With Fusion UI #17

Closed
2 tasks done
zangguojun opened this issue Jun 12, 2022 · 8 comments
Closed
2 tasks done

EXP | With Fusion UI #17

zangguojun opened this issue Jun 12, 2022 · 8 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@zangguojun
Copy link

What is the example you wish to see?

I also know a UI component library that is widely used in Chinese communities, Fusion UI (or alibaba-fusion/next)
Fusion UI : https://github.com/alibaba-fusion/next

Is there any context that might help us understand?

I think Fusion UI and Ant Design UI are very similar in function and use.
I try to install @alifd/next and write @import '@alifd/next/dist/next.css'; in index.css, but it was wrong when reading css files.
This is not a very urgent matter, but I hope you can help me to create a little example or tell me why this is wrong in your spare time.
Thank you for your care.

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@zangguojun zangguojun added the documentation Improvements or additions to documentation label Jun 12, 2022
@louisgv
Copy link
Contributor

louisgv commented Jun 12, 2022

@zangguojun what error are you seeing when doing so?

@zangguojun
Copy link
Author

@zangguojun what error are you seeing when doing so?

Like this
image

@zangguojun
Copy link
Author

@ColdSauce
Copy link
Contributor

Hi @zangguojun,

This is happening because the Parcel CSS parser doesn't believe the imported CSS from @alifd/next/dist/next.css is valid.

This is due to the following line in the CSS file:

@media all and (min-width: 0\0 ) and (min-resolution: 0.001dpcm) {

(The 0\0 is what it is complaining about since it's not valid CSS. It's a hack in CSS to detect IE)

Here's the relevant Parcel issue discussing this.

The way they say to solve it is to use something like patch-package to patch the CSS file in node_modules or submit an issue/PR to the next project asking them to remove the incorrect syntax CSS and use @supports. Most of the issues on that repo are in Chinese, so I'm not sure if someone talked about this already there.

If you find a way to get this to work with Plasmo, it'd be amazing to share it with the community by submitting a PR to our examples repo.

@ColdSauce
Copy link
Contributor

It looks like something like this was reported but the maintainer added a wontfix tag,

@louisgv louisgv added the help wanted Extra attention is needed label Jun 16, 2022
@louisgv
Copy link
Contributor

louisgv commented Jun 16, 2022

Technically, we can cook the @alifd/next's css import code in our resolver and make it behave appropriately (i.e, patch out the css pieces that aren't working).

@louisgv
Copy link
Contributor

louisgv commented Jun 16, 2022

Actually - postcss got this! parcel-bundler/parcel#7854 (comment)

@zangguojun try adding that postcss plugin and see if it work - I think we can close this :D

@louisgv louisgv closed this as completed Jun 16, 2022
@xmsz
Copy link

xmsz commented Sep 8, 2022

parcel-bundler/parcel#7854 (comment)

no working

louisgv pushed a commit that referenced this issue Feb 9, 2025
chore(deps): update react monorepo to v19 (major)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants