We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@svgr/core
@svgr/babel-preset
@svgr/core imports @svgr/babel-preset:
svgr/packages/core/src/config.ts
Line 4 in 8b9edc4
but doesn't specify it as a dependency:
svgr/packages/core/package.json
Lines 40 to 47 in 8b9edc4
For the user, this causes the following error in node_modules/@svgr/core/dist/index.d.ts:
node_modules/@svgr/core/dist/index.d.ts
TS2307: Cannot find module '@svgr/babel-preset' or its corresponding type declarations.
and consequently Options is imported as type any.
Options
any
This causes Config["template"] to have type any for the user (imported as import type { Config } from "@svgr/core";).
Config["template"]
import type { Config } from "@svgr/core";
-
@svgr/core defines @svgr/babel-preset as a dependency (or other appropriate fix), so that Config["template"] has correct type instead of any.
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
## System: - OS: macOS 12.6 - CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz - Memory: 1.73 GB / 32.00 GB - Shell: 5.8.1 - /bin/zsh ## Binaries: - Node: 16.16.0 - /usr/local/bin/node - Yarn: 1.22.19 - /usr/local/bin/yarn - npm: 8.11.0 - /usr/local/bin/npm ## npmPackages: - @svgr/core: 6.3.1 => 6.3.1
The text was updated successfully, but these errors were encountered:
Hello @emlai, could submit a PR to fix it please?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug Report
@svgr/core
imports@svgr/babel-preset
:svgr/packages/core/src/config.ts
Line 4 in 8b9edc4
but doesn't specify it as a dependency:
svgr/packages/core/package.json
Lines 40 to 47 in 8b9edc4
For the user, this causes the following error in
node_modules/@svgr/core/dist/index.d.ts
:and consequently
Options
is imported as typeany
.This causes
Config["template"]
to have typeany
for the user (imported asimport type { Config } from "@svgr/core";
).To Reproduce
-
Expected behavior
@svgr/core
defines@svgr/babel-preset
as a dependency (or other appropriate fix), so thatConfig["template"]
has correct type instead ofany
.Link to repl or repo (highly encouraged)
-
Run
npx envinfo --system --binaries --npmPackages @svgr/core,@svgr/cli,@svgr/webpack,@svgr/rollup --markdown --clipboard
The text was updated successfully, but these errors were encountered: