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

can't use mfsu #92

Open
transtone opened this issue Sep 2, 2021 · 6 comments
Open

can't use mfsu #92

transtone opened this issue Sep 2, 2021 · 6 comments

Comments

@transtone
Copy link

transtone commented Sep 2, 2021

Describe the bug

AssertionError [ERR_ASSERTION]: [MFSU] package.json not found for dep windi.css which is imported from @/app.js

umi3 项目配置开启 msfu 时,会报找不到 windi.css 的错误。

@harlan-zw
Copy link
Member

Hey @transtone

Guessing this is the same issue as windicss/vue-cli-plugin-windicss#26 ?

So either add the ignore for windi or you can try import virtual:windi.css instead

@transtone
Copy link
Author

transtone commented Sep 3, 2021

virtual:windi.css

webpack5's mfsu not use .eslintrc.js, and import 'virtual:windi.css' not worked either.

@harlan-zw
Copy link
Member

Are yu able to provide a reproduction repo for me

@transtone
Copy link
Author

this is a reproduction repo:
https://github.com/transtone/umijs-windicss

@harlan-zw
Copy link
Member

Hey @transtone

Thanks for the reproduction link. I've looked into it, it seems like an issue with the MFSU and virtual modules. I've made an issue on the umi repo umijs/umi#7303, will sort out a proper fix if they get back to me.

For now, if you really want to get it running, you can disable mfsu:

mfsu: false,

You will also need to import windi as windi.css instead of virtual:windi.css as well

import 'windi.css';

@transtone transtone changed the title 不兼容 mfsu can't use mfsu Sep 18, 2021
@LanJamRom
Copy link

LanJamRom commented May 27, 2022

now, umi4 has provided tailwind plugin that work in msfu mode as well. I tried to write a windicss plugin referring to this tailwind plugin, but failed.

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