Skip to content

Add types for virtual:windi-devtools #294

@kotx

Description

@kotx

Describe the bug

When importing virtual:windi-devtools in TypeScript code, it errors with Cannot find module 'virtual:windi-devtools' or its corresponding type declarations.ts
But in the build, there's no error and devtools is loaded normally, since it's just a TypeScript error. Adding // @ts-ignore works as expected.

Minimal Reproductions

I'm following the SvelteKit instructions here https://windicss.org/integrations/vite.html#sveltekit-as-of-1-0-0-next-102
and I added

import { browser } from "$app/env";
if (browser) import("virtual:windi-devtools")

Versions

  • vite-plugin-windicss: 1.8.4
  • vite: 2.9.0?
  • framework(vue/react/svelte/etc): svelte(kit)@next

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions