Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Build with Rollup" documentation is broken #1304

Open
tournesolo opened this issue Feb 13, 2024 · 1 comment
Open

The "Build with Rollup" documentation is broken #1304

tournesolo opened this issue Feb 13, 2024 · 1 comment

Comments

@tournesolo
Copy link

tournesolo commented Feb 13, 2024

Which package(s) are affected?

Lit Core (lit / lit-html / lit-element / reactive-element)

Description

Trying to follow the instructions for building-with-rollup triggers multiple errors:

  1. "While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file"
    Solution: Rename rollup.config.js to rollup.config.mjs

  2. "The requested module '@web/rollup-plugin-html' does not provide an export named 'default'"
    Solution:
    import { rollupPluginHTML as html } from "@web/rollup-plugin-html";

  3. The requested module '@rollup/plugin-terser' does not provide an export named 'terser'
    Solution:
    import terser from '@rollup/plugin-terser';

  4. TypeError: minifyHTML is not a function
    Solution:
    import pkgMinifyHTML from 'rollup-plugin-minify-html-literals';
    const minifyHTML = pkgMinifyHTML.default

Reproduction

Follow the instructions at building-with-rollup

Workaround

See above

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

2.x

Browser/OS/Node environment

node v20.11.0
npm 10.2.4

@augustjk augustjk transferred this issue from lit/lit Feb 15, 2024
@augustjk
Copy link
Member

Thank you for the report! Transferred issue to the lit.dev repo as this is a documentation issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants