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 Request]: Add support for webpackInclude and webpackExclude magic comments #2335

Closed
zakuru opened this issue Mar 17, 2023 · 8 comments
Labels
feat New feature or request stale

Comments

@zakuru
Copy link
Contributor

zakuru commented Mar 17, 2023

What problem does this feature solve?

Hi,
Webpack supports webpackExclude and webpackInclude magic comments as shown here : https://webpack.js.org/api/module-methods/#magic-comments
Is there some plan in progress to have it supported by rspack ?

What does the proposed API of configuration look like?

https://webpack.js.org/api/module-methods/#magic-comments
webpack/webpack#5809

// Single target
import(
  /* webpackChunkName: "my-chunk-name" */
  /* webpackMode: "lazy" */
  /* webpackExports: ["default", "named"] */
  'module'
);

// Multiple possible targets
import(
  /* webpackInclude: /\.json$/ */
  /* webpackExclude: /\.noimport\.json$/ */
  /* webpackChunkName: "my-chunk-name" */
  /* webpackMode: "lazy" */
  /* webpackPrefetch: true */
  /* webpackPreload: true */
  `./locale/${language}`
);

Thank you

@zakuru zakuru added the feat New feature or request label Mar 17, 2023
@zackarychapple
Copy link
Collaborator

@IWANABETHATGUY should this be closed since #2367 is merged?

@zakuru
Copy link
Contributor Author

zakuru commented Mar 21, 2023

Thanks a lot @IWANABETHATGUY 🙏

@IWANABETHATGUY
Copy link
Contributor

No, that pr is just a prerequisite of this feature.

@zakuru
Copy link
Contributor Author

zakuru commented May 10, 2023

HI @IWANABETHATGUY
Seems that this one can be closed or there is work left to do ?
Thanks

@IWANABETHATGUY
Copy link
Contributor

@hyf0 , can we close this?

@stale
Copy link

stale bot commented Jul 9, 2023

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!

@stale stale bot added the stale label Jul 9, 2023
@zakuru zakuru closed this as completed Jul 10, 2023
@ywang1724
Copy link

Not supported yet? Rspack@0.3.4

@LingyuCoder
Copy link
Collaborator

not sure why this issue was closed, support by #7055

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

No branches or pull requests

5 participants