Closed ar53n closed 3 years ago
@tabler/icons
doesn't have icons/settings.svg
specified in their exports
field. So it is hidden from external users. Vite is working as expected.
The error message has been improved in the latest version, too:
> node_modules/vite/dist/node/chunks/dep-0ed4fbc0.js:32135:7: error: [plugin: vite:dep-scan] Missing "./icons/settings.svg?url" export in "@tabler/icons" package
This issue gets locked because it has been closed for more than 14 days.
Describe the bug
Problem with package
exports
field and deep path import. Some packages can use string in this field.https://github.com/vitejs/vite/blob/61ea32056048e902ca69d88e1b0a2d21660dae2a/packages/vite/src/node/plugins/resolve.ts#L640-L651
Reproduction
@tabler/icons
import settingsUrl from "@tabler/icons/icons/settings.svg?url";
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
Logs
Before submitting the issue, please make sure you do the following