-
-
Notifications
You must be signed in to change notification settings - Fork 594
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 compilation.mainTemplate.hooks.localVars
hook
#2982
Comments
hi @alexander-akait, I see the comment in https://github.com/webpack/webpack/blob/main/lib/MainTemplate.js#L40, and want to know whether MainTemplate will be removed in webpack6 and are all the hooks in mainTemplate will be gone, if MainTemplate will be removed what's alternative to put all these hooks, because if it will be removed in webpack@6 then we don't think it's necessary to implement it in rspack. |
It will be removed without replacement, we have good messages about deprecations - https://github.com/webpack/webpack/blob/main/lib/MainTemplate.js#L301, therefore, we should not implement it |
so there's no alternative for |
Based on logic you can rewrite it using |
https://github.com/nuxt/nuxt/blob/a672cd7a4291eb812d76b9841ec516cd8609c680/packages/webpack/src/plugins/chunk.ts#L22 can be rewritten on using |
it seems all the hooks(which is useful) in the Template will be replaced with some hook in compilation? |
@hardfist Yeah, we done a lot of refactor around runtime and now runtime contains modules, like other modules, so now it is possible to write custom plugins with runtime without hacking like |
low priority now we can reopen if we do need it |
What problem does this feature solve?
What does the proposed API of configuration look like?
The text was updated successfully, but these errors were encountered: