Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types of the plugin #20

Closed
sergiodxa opened this issue Apr 4, 2024 · 1 comment
Closed

Types of the plugin #20

sergiodxa opened this issue Apr 4, 2024 · 1 comment

Comments

@sergiodxa
Copy link

When I import the plugin as

import { createSvgSpritePlugin } from "@mcansh/vite-svg-sprite-plugin";

TS complains the package has no types, but if I do:

import { createSvgSpritePlugin } from "@mcansh/vite-svg-sprite-plugin/dist";

It finds the types, but then Vite complains

The plugin "externalize-deps" was triggered by this import

    vite.config.ts:2:38:
      2 │ ...teSvgSpritePlugin } from "@mcansh/vite-svg-sprite-plugin/dist";
@mcansh
Copy link
Owner

mcansh commented Apr 4, 2024

huh that's interesting, all is well in my testing with "moduleResolution": "Bundler" - I'll take a look after i finish some testing of hashing the output sprite.

my guess is due to not setting a types or main property in package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants