Skip to content
Discussion options

You must be logged in to vote

as pointed out, the Vite alias does work (in my case I use @ which is what most people tend to use but you could replace it with any other alias you wish to use)

vite.config.ts

export default defineConfig({
  plugins: [
    Vue({ template: { transformAssetUrls }, }),
    quasar({ sassVariables: 'src/styles/quasar.scss', }),
  ],
  resolve: {
    alias: {
      '@/': `${path.resolve(__dirname, 'src')}/`,
    },
  },
});

tsconfig.json

{
  "compilerOptions": {
    // ...
    "paths": {
      "@/*": ["src/*"]
    }
  }
}

About.vue

<script lang="ts">
import Content from '@/Content.vue';
</script>

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@stefanvanherwijnen
Comment options

@francoism90
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by metalsadman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants