Static GitHub Issues

[262] Importing Vue modules using TypeScript

prev: IE10 issue - the page displays without styling for a brief moment before rendering scripts and styles
next: Includes SASS file as a nuxt.config.js CSS asset?

In my app, I have the following structure:

  • components/
  • components/myComponent.vue
  • pages/
  • pages/index.vue
<script lang="ts"> import MyComponent from "~components/myComponent" ``` export default { components: { MyComponent } } </script>
This does not work, it is unable to find the module. When I remove "lang="ts"" it still does not work, but stopping/restarting nuxt resolves the issue.

<!--cmty--><!--cmty_prevent_hook-->
<div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c229">#c229</a>)</em></sub></div>