-
Notifications
You must be signed in to change notification settings - Fork 22
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
htmlTemplate is not a function #37
Comments
Please help me out |
Rewrite your "vite.config.js":
The module exports the function in "default" property. |
Up because it is not correct with TypeScript |
I concur that this is broken when using in TypeScript projects. A possible workaround: import htmlTemplate from "vite-plugin-html-template";
export default defineConfig({
plugins: [
(htmlTemplate as unknown as { default: typeof htmlTemplate }).default(/* options */)
]
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting this error after updating to Vite 5 and after adding type=""module" in package.json as required in Vite 5 . Is there workaround this ?
The text was updated successfully, but these errors were encountered: