Skip to content

TS support fails with incorrect browser import #61

@akaufmann

Description

@akaufmann

For example, when you import a TS file into App.vue and access an exported member...

// App.vue
<script lang="ts">
import { count } from "./foo"

export default {
  data: () => ({ count })
}
</script>

... you get an Failed to load module script error:
Bildschirmfoto 2020-05-06 um 14 04 58

vite/esbuild creates a foo resource without the .js/.ts extension. The JS file is also not accessible if you call it directly like http://localhost:3000/<path/to/foo.js>?t=<hash>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions