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

env.d.ts can not find type definition file #8

Closed
derekrjones opened this issue Jun 17, 2024 · 2 comments
Closed

env.d.ts can not find type definition file #8

derekrjones opened this issue Jun 17, 2024 · 2 comments

Comments

@derekrjones
Copy link

in any of the examples, there is extension/env.d.ts

/// <reference types="@tomjs/vite-plugin-vscode/env" />

this seems to work fine in your workspace,
I see it listed in 'files' in package.json
but when used an external project env cannot be found. I'm guessing because its not part of the exports
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist",
"env.d.ts"
],

It works if I include it in exports

  "exports": {
    ".": {
      "require": "./dist/index.js",
      "import": "./dist/index.mjs",
      "types": "./dist/index.d.ts"
    },
    "./env": {
      "types": "./env.d.ts"
    }
  },
@tomgao365
Copy link
Member

Please try v2.4.0

@derekrjones
Copy link
Author

working great! thanks for the quick release!

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