You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently running into an issue where vuetype refuses to generate a typing definition file for one of my Vue files due to json module imports that the TypeScript compiler could not find. However, these json modules do actually exist in the location specified in the import as far as I know.
I was not able to reproduce this issue with ts-node, which is another module I have in my project that uses the TypeScript compiler under the hood, so I am not sure whether this is an issue with vuetype or with my TypeScript configuration. Let me know if you think this is actually an issue with my TypeScript configuration rather than with vuetype and I'll take this question to StackOverflow (and close this ticket).
My setup:
I have a site/ subdirectory where I have an index.ts file (the entry point of my webpack build) that includes App Vue object from App.vue file in the same subdirectory. App.vue includes several components from site/components (which work as expected) as well as two JSON files from site/assets/data like this:
import * as movies from "./assets/data/movies.json";
import * as importedOrderings from "./assets/data/orderings.json";
I have placed this on both the root directory and the subdirectory where my TypeScript and Vue files are located (site/).
I have also tried enabling the new features in TypeScript 2.9 to allow for json modules to be default imports in my tsconfig.json (which I read is also apparently a way to get TypeScript to recognize json imports but I can be wrong about this)
I am currently running into an issue where vuetype refuses to generate a typing definition file for one of my Vue files due to json module imports that the TypeScript compiler could not find. However, these json modules do actually exist in the location specified in the import as far as I know.
I was not able to reproduce this issue with ts-node, which is another module I have in my project that uses the TypeScript compiler under the hood, so I am not sure whether this is an issue with vuetype or with my TypeScript configuration. Let me know if you think this is actually an issue with my TypeScript configuration rather than with vuetype and I'll take this question to StackOverflow (and close this ticket).
My setup:
I have a
site/
subdirectory where I have anindex.ts
file (the entry point of my webpack build) that includesApp
Vue object fromApp.vue
file in the same subdirectory.App.vue
includes several components fromsite/components
(which work as expected) as well as two JSON files fromsite/assets/data
like this:What am I expecting:
vuetype emits
App.vue.d.ts
without errorWhat do I actually get?:
What I have tried:
typings.d.ts
file with the following general declaration inside:I have placed this on both the root directory and the subdirectory where my TypeScript and Vue files are located (
site/
).Neither of these options worked for me either (but it still does allow me to specify the json imports as default imports).
I don't know what may be happening here, and if it's possible that I could be pointed in the right direction I'd really appreciate it!
My current tsconfig.json
If there's any other information you need regarding my project setup, let me know.
The text was updated successfully, but these errors were encountered: