You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to follow the instructions for building-with-rollup triggers multiple errors:
"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
"The requested module '@web/rollup-plugin-html' does not provide an export named 'default'" Solution: import { rollupPluginHTML as html } from "@web/rollup-plugin-html";
The requested module '@rollup/plugin-terser' does not provide an export named 'terser' Solution: import terser from '@rollup/plugin-terser';
TypeError: minifyHTML is not a function Solution: import pkgMinifyHTML from 'rollup-plugin-minify-html-literals'; const minifyHTML = pkgMinifyHTML.default
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:
"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
torollup.config.mjs
"The requested module '@web/rollup-plugin-html' does not provide an export named 'default'"
Solution:
import { rollupPluginHTML as html } from "@web/rollup-plugin-html";
The requested module '@rollup/plugin-terser' does not provide an export named 'terser'
Solution:
import terser from '@rollup/plugin-terser';
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
The text was updated successfully, but these errors were encountered: