Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
Discussion options

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...

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #1942 on November 17, 2025 14:08.

AltStyle によって変換されたページ (->オリジナル) /