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

[Feature/Question] MFSU Support Virtual Modules #7303

Closed
harlan-zw opened this issue Sep 12, 2021 · 10 comments
Closed

[Feature/Question] MFSU Support Virtual Modules #7303

harlan-zw opened this issue Sep 12, 2021 · 10 comments
Assignees

Comments

@harlan-zw
Copy link

Related: windicss/windicss-webpack-plugin#92 (comment)

The MFSU scans modules, resolving their package.json based on their path (afaik), the windicss webpack plugin uses a virtual module that does not have a package.json, leading to the error:

 error  in ./src/app.ts

Module build failed (from ./node_modules/@umijs/deps/compiled/babel-loader/index.js):
**AssertionError [ERR_ASSERTION]: [MFSU] package.json not found for dep windi.css which is imported from @/app.ts
    at getDepVersion (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/features/mfsu/getDepVersion.js:129:27)**
    at DepInfo.addTmpDep (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/features/mfsu/DepInfo.js:141:56)
    at Object.onTransformDeps (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/umi/node_modules/@umijs/preset-built-in/lib/plugins/features/mfsu/mfsu.js:321:23)
    at PluginPass.exit (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/babel-plugin-import-to-await-require/lib/index.js:217:140)
    at newFn (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:62022:21)
    at NodePath._call (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:56841:20)
    at NodePath.call (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:56828:17)
    at NodePath.visit (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:56887:8)
    at TraversalContext.visitQueue (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:56353:16)
    at TraversalContext.visitSingle (/home/harlan/packages/windicss-webpack-plugin/umijs-windicss/node_modules/@umijs/deps/compiled/babel/bundle.js:56322:19)

Is there any way to have a module skipped by MFSU?

Thanks :)

@xiefengnian
Copy link
Contributor

I'm trying to fix this problem~

@xiefengnian xiefengnian self-assigned this Sep 27, 2021
@kevinpursuing
Copy link

@xiefengnian 请问问题解决了吗

@kevinpursuing
Copy link

@xiaohuoni 请问这个问题修复了吗

@soulcm
Copy link

soulcm commented Jan 21, 2022

这个问题umijs这边有人在解决吗,我这边也遇到了

1 similar comment
@z1948296027
Copy link

这个问题umijs这边有人在解决吗,我这边也遇到了

@kevinpursuing
Copy link

请问什么时候解决呢

@chenkaixia
Copy link

这个还没有解决啊

@sorrycc sorrycc closed this as completed Jul 4, 2022
@GrinZero
Copy link

+1

@EricWong1994
Copy link

+1,咋close了 @sorrycc

@EricWong1994
Copy link

当config中开启 webpack5: {} 配置后, windicss的text-3xl font-semibold font-600 不生效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants