-
How to make exported |
Beta Was this translation helpful? Give feedback.
Answered by
mesqueeb
Aug 20, 2022
Replies: 1 comment
-
|
If your
-- If this gives you issues with your project setup, you can set up a separate eg. {
"compilerOptions": {
// ...
"baseUrl": ".",
"outDir": "dist"
},
"include": ["./src/**/*.vue"]
}Then in your script you make sure that
"generate:types": "vue-tsc --declaration --emitDeclarationOnly --project tsconfig.declaration.json", |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mesqueeb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If your
tsconfig.json"include" is only pointing at stuff inside yoursrcfolder, it will not be included when building the type declarations."include": ["./**/*.vue"]this will includesrcfolder insidedist→dist/src"include": ["./src/**/*.vue"]this wont includesrcfolder, it will emit directly intodist--
If this gives you issues with your project setup, you can set up a separate
tsconfig.jsonfor emitting the type declarations.eg.
tsconfig.declaration.json{ "compilerOptions": { // ... "baseUrl": ".", "outDir": "dist" }, "include": ["./src/**/*.vue"] }Then in your script you make sure that
tsconfig.declaration.jsonis used instead.package.jsonscripts:"…