Although it can work normally, there still see the warning, It seems that this part of the inspection is incorrect, I try to append .mjs suffix to vant resolver like vant/es/${name}/style/index.mjs, then the warning is gone, but this will lead to the incompatibility of the vant before version 3.5.0, so is there a better way to check? @psaren
vant@3.5.0 has adjusted the file extension of ESModules from .js to .mjs, This resulted in the following error:
https://youzan.github.io/vant/#/en-US/changelog
Like vite-plugin-style-import code for vant resolver, the suffix can be ignored.
Although it can work normally, there still see the warning, It seems that this part of the inspection is incorrect, I try to append
.mjs
suffix to vant resolver likevant/es/${name}/style/index.mjs
, then the warning is gone, but this will lead to the incompatibility of the vant before version 3.5.0, so is there a better way to check? @psarenhttps://github.com/onebay/vite-plugin-imp/blob/8112cc1d5d9c13d20ed2df105cc8e0416ba4c5ec/src/shared.ts#L99-L118