Closed FranciscoKloganB closed 1 year ago
When I import ViteImageOptimizer } in nuxt.config.ts on a TypeScript based project Then a warning about missing type declarations occurs
ViteImageOptimizer }
nuxt.config.ts
Create new nuxt project Install plugins and dependencies (sharp, svgo)
Add to nuxt.config.ts
// `Could not find a declaration file for module 'vite-plugin-image-optimizer'` import { ViteImageOptimizer } from 'vite-plugin-image-optimizer'
Results in the error above, no types exist for lib.
Windows 11 (but same result in Ubuntu 22.04 and MacOS latest) System: OS: Windows 10 10.0.22621 CPU: (16) x64 AMD Ryzen 7 5800X 8-Core Processor Memory: 37.36 GB / 63.93 GB Binaries: Node: 18.12.1 - C:\Program Files\nodejs\node.EXE npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.22621.963.0), Chromium (110.0.1587.49) Internet Explorer: 11.0.22621.1 npmPackages: @vitejs/plugin-vue: ^4.0.0 => 4.0.0 vite: ^4.1.4 => 4.1.4 vite-plugin-image-optimizer: ^1.0.8 => 1.0.8 vite-tsconfig-paths: ^4.0.5 => 4.0.5 vitest: ^0.28.5 => 0.28.5
pnpm
Thanks for raising this issue. Type definitions have been added to the project now. Please update the package to v1.0.10.
v1.0.10
I've published v1.1.0 with full TS typings please check with that version.
v1.1.0
Describe the Bug
When I import
ViteImageOptimizer }
innuxt.config.ts
on a TypeScript based project Then a warning about missing type declarations occursSteps to reproduce
Create new nuxt project Install plugins and dependencies (sharp, svgo)
Add to
nuxt.config.ts
Results in the error above, no types exist for lib.
System Info
Used Package Manager
pnpm
Validations