Answers for "import absolute path or path alias vite vue"

0

import absolute path or path alias vite vue

// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
const path = require('path')

// https://vitejs.dev/config/
export default defineConfig({
  resolve:{
    alias:{
      '@' : path.resolve(__dirname, './src')
    },
  },
  plugins: [vue()]
})
Posted by: Guest on February-17-2022

Browse Popular Code Answers by Language