You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a probably simple question but I cannot figure out the problem. I moved from webpack 4 to webpack 5 in a Rails application, and now, when I load the javascript module from the HTML page, the code is no longer executed.
When I inspect and debug the generated /packs/js/application-5fb7bb797c21e44c763b.js file, I see that my application code (the main code in app/webpack/packs/application.js) is inside but wrapped as it is waiting to be loaded as a module, and it is never called.
Why is webpack not executing the main module?
I suspect that has to be with chunking the code in multiple files, and the generated files should only declare the modules and not execute them, but here it is my main module and I need to execute it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a probably simple question but I cannot figure out the problem. I moved from webpack 4 to webpack 5 in a Rails application, and now, when I load the javascript module from the HTML page, the code is no longer executed.
The webpack configuration contains:
When I inspect and debug the generated
/packs/js/application-5fb7bb797c21e44c763b.js
file, I see that my application code (the main code inapp/webpack/packs/application.js
) is inside but wrapped as it is waiting to be loaded as a module, and it is never called.Why is webpack not executing the main module?
I suspect that has to be with chunking the code in multiple files, and the generated files should only declare the modules and not execute them, but here it is my main module and I need to execute it.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions