Closed userquin closed 2 years ago
@antfu it seems we are using chalk
(not esm
ready), changing to use kolorist
(the same change we made on unplugin-icons
)
EDIT: once removed chalk
, now @rollup/pluginutils
uses picomatch
, not esm
ready?, we can remove @rollup/pluginutils
and include a custom implementation (just copy/paste from it): I'll try to clone the behavior, we also need to provide FilterPattern
: https://github.com/rollup/plugins/issues/539
EDIT 2: to align with vite
we should use micromatch
: https://github.com/vitejs/vite/pull/5610
@josh-hemphill the error also using vitesse
template repo?
josh-hemphill the error also using
vitesse
template repo?
I believe so, yes.
Yeah, that's the first error after changing the project type.
Though to get vitesse working I have to do npm i -D critters@^0.0.10 @vueuse/head@^0.5.1
to get the packages to install.
Also having this issue when I set my package.json to type:module.
Changing the export statement in vite plugin inspect to js instead of mjs solves the issue on my end.
"exports": { ".": { "require": "./dist/index.js", "import": "./dist/index.js" // changed from mjs to js. } }
It does mean I have to import the plugin like this however.
( inspect as any ).default()
@userquin any updates on this?
@emme1444 I'm working on it right now
@emme1444 I have it working with vite + svelte
and vitesse + type module
+ vitesse + NO type module
(the same project): you can see it in action:
vite svelte
config here https://imgur.com/OR2wGQD and the inspector here https://imgur.com/sb9pry6vitesse + type module
config here https://imgur.com/yUrqQoI and the inspector here https://imgur.com/GqdkaZ4.vitesse + NO type module
config (undoing previous type module) here https://imgur.com/9S0XFZx and the inspector here https://imgur.com/yutcnQ3./cc @antfu PR in a few minutes: some plugins must be used with .default()
, for example VueI18n
and Layouts
using vitesse project
.
context: https://github.com/antfu/unplugin-auto-import/issues/79#issuecomment-977159278