Describe the bug
See the same issue in different package Anber/wyw-in-js#33
I was investigating why node types are included in my project and came to cause being .wxt/types/imports.d.ts file, which imports for example:
const ContentScriptContext: typeof import('wxt/client')['ContentScriptContext']
And that file uses:
import { ContentScriptDefinition } from '../../types'
Which in turn imports:
import type * as vite from 'vite';
If we look at vite, it uses <reference types="node" /> which means any file importing it also gets the same types.
The fix would be split vite types from client ones, so two are not mixed.
Reproduction
n/a
Steps to reproduce
Try using const timeout: number = setTimeout(() => {})
System Info
Used Package Manager
pnpm
Validations
Describe the bug
See the same issue in different package Anber/wyw-in-js#33
I was investigating why node types are included in my project and came to cause being
.wxt/types/imports.d.tsfile, which imports for example:const ContentScriptContext: typeof import('wxt/client')['ContentScriptContext']And that file uses:
import { ContentScriptDefinition } from '../../types'Which in turn imports:
import type * as vite from 'vite';If we look at vite, it uses
<reference types="node" />which means any file importing it also gets the same types.The fix would be split vite types from client ones, so two are not mixed.
Reproduction
n/a
Steps to reproduce
Try using
const timeout: number = setTimeout(() => {})System Info
Used Package Manager
pnpm
Validations