Hi,
I’m trying to split my UI js content into multiple files.
The bundling works in theory, if I add the js files to my app.ts in my webpack configuration:
entry: {
app: ['./src/app.ts', './src/test.js'] // This is the entry point for our plugin code.
},
The code of test.js now runs, but with strong limitations.
- The js in my ui.html cannot use the functions of the test.js
- If I try to use the DOM in my test.js, the plugin crashs
- I also tried to use a typescript format instead of js for my test file, so I can use the import command, but DOM related code like “document” is unknown for typescript.
The main goal I want to achieve is simply having a cleaner structure and in best case, referencing my js content across files. 😃
I was also taking a look into the Libraries and Bundling documentation and tried it with the script tag and as said with the bundling as well to add more js files to my UI.
Thanks for your help!