I
I
Igor2021-12-27 21:22:20
Vue.js
Igor, 2021-12-27 21:22:20

Why can't you see the picture?

Here is my vite.config with alias setting

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vuetify from '@vuetify/vite-plugin'

import path from 'path'

// https://vitejs.dev/config/
export default defineConfig({
  base: '/viteMonitorbox/',
  plugins: [
    vue(),
    // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
    vuetify({
      autoImport: true,
    }),
  ],
  define: { 'process.env': {} },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
    },
  },
})

I paste it like this, but the picture still doesn't show up.
<v-img
     max-height="30"
     src="@/assets/logo.png"
></v-img>

here is the tree
61ca03ecc4a9b477924081.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question