You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vite.config.js 代码
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import AutoImport from 'unplugin-auto-import/vite'
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
import importPlugin from '@opentiny/vue-vite-import'
Version
3.14.0
Vue Version
vue3
Link to minimal reproduction
nothing
Step to reproduce
vite.config.js 代码
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import AutoImport from 'unplugin-auto-import/vite'
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
import importPlugin from '@opentiny/vue-vite-import'
export default defineConfig({
plugins: [
vue(),
autoImportPlugin(),
AutoImport({ imports: ['vue', 'pinia', 'vue-router'], dts: false }),
importPlugin(
[
{
libraryName: '@opentiny/vue'
},
{
libraryName:
@opentiny/vue-icon
,customName: (name) => {
return
@opentiny/vue-icon/lib/${name.replace(/^icon-/, '')}.js
}
}
],
'pc' // 此配置非必选,按需配置(pc|mobile|mobile-first)
)
],
resolve: {
// https://cn.vitejs.dev/config/#resolve-alias
alias: {
// 设置路径
'~': path.resolve(__dirname, './'),
// 设置别名
'@': path.resolve(__dirname, './src')
},
// https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
define: {
'process.env': { ...process.env }
}
})
App.vue 代码
运行后,提示 router-view not find
What is expected
No response
What is actually happening
No response
What is your project name
练习的项目
Any additional comments (optional)
No response
The text was updated successfully, but these errors were encountered: