-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow paths replacement for webpack 5 #63
Comments
Hi agoldis @agoldis , any update for this issue ? Best regards |
Hi @agoldis , did you find any solution to use our custom function for 'replaceSrcMethodName' in webpack 5? |
FWIW, you can make your own custom loader which uses a global function...similar to
You can now refer to that loader in your webpack config (in the
This expects a function |
Webpack 5 has a simplified chunks loading mechanism via [
__webpack_require__.l
] (https://github.com/webpack/webpack/blob/4837c3ddb9da8e676c73d97460e19689dd9d4691/lib/RuntimeGlobals.js#L169)monkey-patching this function would allow to create an override method like
replaceSrcMethodName
that accepts the original URL (and possibly more params).The patch should via a different main template hook, because
local-variables
comes before__webpack_require__.l
definition https://github.com/webpack/webpack/blob/4837c3ddb9da8e676c73d97460e19689dd9d4691/lib/MainTemplate.js#L241The text was updated successfully, but these errors were encountered: