Replies: 4 comments 1 reply
-
If I understand your problem well, you can use jquery from cdn and set it as external in webpack. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! However, the javascript still does not work in the HTML. By itself it should show the log.html and if I then click on the login button, an alert should be triggered, the console should log something and it should switch to the wizard page. Could this be because the pages are not loading properly in webpack or is there still a bug in the code?
|
Beta Was this translation helpful? Give feedback.
-
not sure what you are trying to achieve...
is not handled by webpack, see example https://webpack.js.org/configuration/externals/#externals |
Beta Was this translation helpful? Give feedback.
-
To maybe help others further: index.html
webpack.main.config.js
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created with the help of the webpack template from Electron Forge the basis for a project that works with webpack. However, I now have the problem that apparently the jQuery script is added to the HTML pages, but the individual commands are not recognized. My goal is to start from the index.html and from there, by swapping the main container, load my other HTML pages.
index.html
webpack.main.config.js
So my questions now would be:
How do I define jQuery in webpack so that it recognizes the functions?
How do I correctly add multiple pages in webpack and make them load using the index.html ?
Here is my full project code (without the node_modules) so far: https://github.com/V-Krause/NewtonElectronWebpack
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions