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

Support DynamicEntryPlugin and resolve.plugins #3890

Closed
hhuwc opened this issue Aug 3, 2023 · 5 comments
Closed

Support DynamicEntryPlugin and resolve.plugins #3890

hhuwc opened this issue Aug 3, 2023 · 5 comments
Labels
awaiting more feedback feat New feature or request

Comments

@hhuwc
Copy link

hhuwc commented Aug 3, 2023

What problem does this feature solve?

There are serval questions i have meet during migrating webpack to rspack compiler,i need Rspack team to help me fix these problems.

the Reproduce link is https://github.com/hhuwc/migrate-to-rspack

What does the proposed API of configuration look like?

https://github.com/webpack/webpack/blob/1f99ad6367f2b8a6ef17cce0e058f7a67fb7db18/lib/DynamicEntryPlugin.js#L17

https://webpack.js.org/configuration/resolve/#resolveplugins

@hhuwc hhuwc added feat New feature or request pending triage The issue/PR is currently untouched. labels Aug 3, 2023
@hyf0 hyf0 added awaiting more feedback and removed pending triage The issue/PR is currently untouched. labels Aug 3, 2023
@hhuwc
Copy link
Author

hhuwc commented Aug 3, 2023

Okay, Rspack may not suit the building of complex applications in current state

@hardfist
Copy link
Contributor

hardfist commented Aug 9, 2023

  1. resolve.plugins目前的确不支持,你有什么定制resolve.plugin的需求?如果是alias的话,目前内置了alias的方案
  2. DynamicEntryPlugin目前也不支持
  3. 其他问题好像在最新的rspack版本里不能复现

@hhuwc
Copy link
Author

hhuwc commented Sep 8, 2023

感谢回复:

  1. resolve plugin 用来做引用限制的,在小程序场景中有a包 不能引用 b包中的内容这种限制
  2. DynamicEntryPlugin 是因为小程序场景中入口是由app.json 中配置的页面决定的,所以需要动态创建的能力
  1. resolve.plugins目前的确不支持,你有什么定制resolve.plugin的需求?如果是alias的话,目前内置了alias的方案
  2. DynamicEntryPlugin目前也不支持
  3. 其他问题好像在最新的rspack版本里不能复现

@hardfist
Copy link
Contributor

hardfist commented Sep 8, 2023

  1. 可以通过resolve hook来实现(暂未实现)
  2. dynamicEntryPlugin目前可以通过修改options.entry可以动态组装entry实现
    如果你想用来实现小程序编译的话,我之前正好实现过 https://github.com/hardfist/rspack-miniapp 可供参考

@hardfist
Copy link
Contributor

DynamicEntryPlugin is supported now, and we don't plan to support resolve.plugins in near future(you can use https://www.rspack.dev/api/plugin-api/normal-module-factory-hooks#resolve instead) , so close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting more feedback feat New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants