Closed n0099 closed 8 months ago
Thanks for providing the repo. I don't see this plugin in the codebase, did I miss anything there?
I tried the same set up as yours
/vite.config.js
/assets/test.jpg
/src/App.jsx
When I do import image from '/assets/test.jpg';
, This resolver didn't throw error but the node resolver did. So the import/no-unresolved
error reported was not triggered by this resolver but the node
resolver.
eslint-plugin-import:resolver:node resolve threw error: Error: Cannot find module '/assets/test.jpg' from '/src/App.jsx'
UPDATE:
the import/no-unresolved
error is actually caused by both this resolver and node resolver weren't able to resolve the path. I will investigate more on this.
@n0099 I fixed some issues for resolving absolute import. Can you give 2.0.0-beta.3
a try?
reprod: https://github.com/n0099/open-tbm/blob/81200597d50d9f2a6b9dd59f07ca6a5226c20e25/fe/src/components/placeholders/PlaceholderPostList.vue#L21 It's similar to #7 but these files are placed under
/assets
following https://vitejs.dev/guide/assets so shouldn't get reported.