-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support Native ESM in order to work properly in vitejs
and TypeScript
#23
Comments
add `module` and `exports` attribute into `package.json` file fix pugjs#23
add typescript definition which has stricter type than `@types/void-elements` fix pugjs#23
please @pugjs merge the PR |
Is there anything else we can do to get this merged? Would be great if we can get this one in. |
You can use this module as workaround. |
For me this is being used by I was hoping I could use the {
"overrides": {
"react-i18next": {
"html-parse-stringify": {
"void-elements": "@achmadk/void-elements"
}
}
}
} Is that correct? |
I have the same issue as yours. Although import { defineConfig } from 'vite'
export default defineConfig({
// rest of your vite configuration
resolve: {
alias: [
// another aliases
{
find: 'void-elements',
replacement: '@achmadk/void-elements'
}
]
}
}) That config works for me. |
Nice thanks for that. Will give it a go 👍 |
Hello. I have issue with
void-elements
library insidevite
-based web application project.This library is used by
html-parse-stringify
. I got error like this.Although this library has support ESM with
jsnext:main
, unfortunately this library doesn't support native ESM, which required forvite
in order to work properly.Moreover, I hope this library also have built-in support TypeScript definition because definition file from
@types/void-elements
needs improvement to be stricter.The text was updated successfully, but these errors were encountered: