When attempting to use vite-plugin-vuetify with a TSDown project, I get the following error:
[plugin vuetify:import] rolldown/runtime.js
TypeError: filter is not a function
at TransformPluginContextImpl.transform (file:///Users/work/Desktop/work/myq-core-module/node_modules/vite-plugin-vuetify/dist/index.mjs:37:42)
at plugin (file:///Users/work/Desktop/work/myq-core-module/node_modules/rolldown/dist/shared/bindingify-input-options-CorDub0q.mjs:1207:30)
at plugin.<computed> (file:///Users/work/Desktop/work/myq-core-module/node_modules/rolldown/dist/shared/bindingify-input-options-CorDub0q.mjs:1675:18)
When digging around the code within the plugin, I found that the importPlugin function sets a variable for filter, but only assigns a value to it when configResolved is called. I found that if I use a default assignment like so:
let filter: (id: unknown) => boolean = createFilter();
I can get around the above error and I can build my project with tsdown and still use this plugin.
I've created a PR into the project here that attempts to resolve this issue and make the plugin compatible with tsdown: #358
When attempting to use
vite-plugin-vuetifywith a TSDown project, I get the following error:When digging around the code within the plugin, I found that the importPlugin function sets a variable for
filter, but only assigns a value to it whenconfigResolvedis called. I found that if I use a default assignment like so:I can get around the above error and I can build my project with tsdown and still use this plugin.
I've created a PR into the project here that attempts to resolve this issue and make the plugin compatible with tsdown: #358