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 #1942

Closed
@vadimkantorov

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

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