Skip to content

typescript can't find module .gql #180

Closed
@franciscolourenco

Description

@franciscolourenco

It works fine if you change the language to js.

ERROR in /Users/user/code/reproduce-typescript-vue-cli-plugin-apollo/src/components/ApolloExample.vue
97:19 Cannot find module '../graphql/Files.gql'.
     95 |
     96 | <script lang="ts">
  >  97 | import FILES from "../graphql/Files.gql";
        |                   ^
     98 | import UPLOAD_FILE from "../graphql/UploadFile.gql";
     99 |
    100 | export default {
ERROR in /Users/user/code/reproduce-typescript-vue-cli-plugin-apollo/src/components/ApolloExample.vue
98:25 Cannot find module '../graphql/UploadFile.gql'.
     96 | <script lang="ts">
     97 | import FILES from "../graphql/Files.gql";
  >  98 | import UPLOAD_FILE from "../graphql/UploadFile.gql";
        |                         ^
     99 |
    100 | export default {
    101 |   data() {

vue cli reproduction: https://github.com/reproducing/reproduce-typescript-vue-cli-plugin-apollo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions