-
-
Notifications
You must be signed in to change notification settings - Fork 613
[feature request] [@rollup/plugin-html] Option to not copy entrypoint JS in the output dir, that is single-file HTML output mode with JS bundle inlined into the HTML
#1945
vadimkantorov
started this conversation in
Ideas
-
Basically I'm looking to have an HTML template
<html> <body> <script type="module"> import CMS, { init } from '@sveltia/cms'; init(); </script> </body> </html>
defined as entry point. And I'd like to get a single HTML file as output (and have all dependencies inlined).
With this plugin I almost achieved this with:
- having to define a JS entry point, and place the script part in there
- defining a tricky custom rollup.config.js which defines the HTML template and allows to inline the script
- still rollup copies to the output dir the throw-away entry point script
I've also tried using https://open-wc.org/docs/building/rollup/
It allows to define an HTML entry point as I wanted. But I could not figure out how to inline the script.
It would be great to have best of both worlds in the official plugin...
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment