Commit 0a5480f3 by zhangxingmin

push

parent 6dba1a32
import App from './App.vue'; import App from './App.vue';
// // #ifndef VUE3 // #ifndef VUE3
// import Vue from 'vue' import Vue from 'vue'
// App.mpType = 'app' App.mpType = 'app'
// const app = new Vue({ const app = new Vue({
// ...App ...App
// }) })
// app.$mount() app.$mount()
// // #endif // #endif
// #ifdef VUE3 // #ifdef VUE3
import { createSSRApp } from 'vue' import { createSSRApp } from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
// 关键:挂载应用到 #app 节点
app.mount('#app')
return { app } return { app }
} }
// #endif // #endif
......
...@@ -4,7 +4,6 @@ import vue from '@vitejs/plugin-vue'; ...@@ -4,7 +4,6 @@ import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from 'node:url'; import { fileURLToPath, URL } from 'node:url';
export default defineConfig({ export default defineConfig({
base: '/', // 生产环境使用相对路径
plugins: [vue({/* 自定义元素配置 */})], plugins: [vue({/* 自定义元素配置 */})],
resolve: { resolve: {
alias: { '@': fileURLToPath(new URL('./', import.meta.url)) } alias: { '@': fileURLToPath(new URL('./', import.meta.url)) }
...@@ -17,7 +16,6 @@ export default defineConfig({ ...@@ -17,7 +16,6 @@ export default defineConfig({
} }
}, },
build: { build: {
assetsDir: 'assets',
minify: 'terser', minify: 'terser',
terserOptions: { terserOptions: {
compress: { compress: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment