Linking CSS to UI.HTML

The plugin only loads what’s listed in the manifest.json, ignoring all other files. Since it only allows you to specify HTML for UI and JS for backend, you have three options here:

  1. Write CSS and JS inside of the HTML file so you don’t have to load them from other files.

  2. Host and load CSS and JS from the web. Not every hosting would work due to CORS and the plugin having origin set to null. This isn’t a very common way I think.

  3. Use a bundler to inline all files you want into HTML. This is good for larger plugins where writing CSS and JS directly inside of the HTML file would be difficult. You can use Rollup, Webpack, esbuild and anything else you like.

3 Likes