-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
[Bug]: webpack插件在rspack下引用,无法改变chunk的依赖关系,在webpack下可以 #5631
Comments
@wengjiacheng 我不知道这个plugin发生了什么,但我自己写了一个css split插件 虽然目前支持的功能还不多,但您可以试一试 |
|
Hello @wengjiacheng, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by |
|
|
https://github.com/wengjiacheng/rspack-repro |
@xc2 请问这个问题有进展吗,有计划大概什么时候会解决吗? |
@h-a-n-a could you pls tell if mutation support for chunk.files is planned |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
It's not planned to access internal structs like |
I'm trying to use this plugin: https://github.com/privatenumber/webpack-localize-assets-plugin , among other issues the one that seems more complex to solve is related to these lines:
Which is updating the files for a chunk. Example
Suppose we have locales for es, en, ja . After that function we might have something like:
So any other plugin that uses chunk.files or chunkgraph.getFiles() would use the translated assets. Now, related to rspack and its inability to update Also, I've notice that we deal with chunk.files when we @inottn do you have any insights on this matter? My apologies for tagging you. |
System Info
System:
OS: macOS 13.3.1
CPU: 2.5 GHz Intel Core i7
Memory: 16 GB 2133 MHz LPDDR3
Browsers:
Chrome: 120.0.6099.109
npmPackages:
"@rsbuild/core": "^0.4.0",
"@rsbuild/plugin-vue2": "^0.4.0",
Details
有个需求是css文件过大需要拆分,原项目里使用的是css-split-webpack-plugin这个插件,这个插件给出的方法是支持webpack5, 我使用插件给的办法在webpack5中做了尝试也是可以正常打包的,
而且css文件的引入也是正常的
上面两个css引用在是他拆分后打包的结果
然后我在rsbuild构建的项目下也引用了这个插件
这是我的配置,文件可以看到是打包出来了,但是并没有被引用
插件中修改文件的方式
使用的钩子
processAssets
Reproduce link
NONE
Reproduce Steps
npm run build
The text was updated successfully, but these errors were encountered: