-
Notifications
You must be signed in to change notification settings - Fork 9
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
TypeError: minifyHTML is not a function #24
Comments
I'm not able to reproduce this, I assume this is a Can you add more details such as the error stack trace and what version of rollup/node you're using? |
It's actually a part of my Gulp pipeline. Here, let me post the whole Gulp task: "use strict";
import { pipeline } from "stream";
import gulp from "gulp";
import * as minifyHTML from 'rollup-plugin-minify-html-literals';
import * as rollup from "rollup";
import resolve from "@rollup/plugin-node-resolve";
import rollupTs from "@rollup/plugin-typescript";
import multi from "@rollup/plugin-multi-entry";
import esbuild from "rollup-plugin-esbuild";
// Component bundle
export const components = async () => pipeline(gulp.src(`${roots.js}/src/wcomps/**/*.ts`),
async () => {
const out = `${roots.js}/bundle/components.js`;
const bundle = await rollup.rollup({
input: `${roots.js}/src/wcomps/**/*.ts`,
output: {
file: out,
format: "es",
sourcemap: true
},
plugins: [
multi(),
resolve(),
minifyHTML(),
esbuild({
tsconfig: "./Ogma3/wwwroot/js/tsconfig.json",
minify: true,
}),
]
});
return bundle.write({
file: out,
format: "umd",
name: "components",
sourcemap: true
});
},
errorHandler); For reference, I finally got it working with this package: https://github.com/jleeson/rollup-plugin-html-literals |
I'm getting the same error as well. |
I was getting the same issue using Vite. This worked for me:
That said it seriously breaks my app so it is a non-starter for me. I assume it is an issue with: https://www.npmjs.com/package/minify-html-literals |
For me this works with rollup 2.79.1, but crashes with rollup 3.2.2. |
This started happening for me when I changed the package to the type of module and changed the rollup.config extension to mjs. To get around it use minifyHTML.default(); I suspect this is because this package is not of type module. |
Will this be investigated? |
The text was updated successfully, but these errors were encountered: