Closed zu1k closed 1 year ago
Can you try changing esModuleInterop
to true
in your tsconfig.json
and see if that doesn't resolve the issue?
If that fails, see if accessing faviconsPlugin.default
fixes it.
Apologies for this unintended breaking change, I recently switched from compiling the project with Babel to using the TypeScript compiler directly, and it seems to have some subtle differences with respect to how it compiles default exports. I may just switch to a named export for this plugin to circumvent this issue entirely.
Can you try changing
esModuleInterop
totrue
in yourtsconfig.json
and see if that doesn't resolve the issue?
I got the same error whether set esModuleInterop
to true or false.
see if accessing
faviconsPlugin.default
fixes it
This can be successfully compiled, but the code inspection prompts that there is no default
field. Is it because of the difference between index.d.ts
and index.js
?
Alright, changed this to a named export. Update to v0.3.0
and update your import to:
import { faviconsPlugin } from '@darkobits/vite-plugin-favicons';
and you should be good.
import { faviconsPlugin } from '@darkobits/vite-plugin-favicons';
This compiled successfully, but the code inspection prompts that Module '"@darkobits/vite-plugin-favicons"' has no exported member 'faviconsPlugin'.
the code inspection prompts that
Module '"@darkobits/vite-plugin-favicons"' has no exported member 'faviconsPlugin'.
Sorry for that, I restarted my vscode, then it reindex the code, everything works well.
Thank you!
I'm upgrating @darkobits/vite-plugin-favicons to 0.2.0 in https://github.com/book-searcher-org/book-searcher/blob/master/frontend/package.json
I got
TypeError: faviconsPlugin is not a function
, when using 0.1.8 everything works fine.