chore: 同步HBuilderX生成的main.js(Vue2/Vue3兼容)
This commit is contained in:
@ -1,7 +1,24 @@
|
|||||||
import { createSSRApp } from "vue";
|
import App from './App'
|
||||||
import App from "./App.vue";
|
|
||||||
|
|
||||||
|
// #ifndef VUE3
|
||||||
|
import Vue from 'vue'
|
||||||
|
import './uni.promisify.adaptor'
|
||||||
|
Vue.config.productionTip = false
|
||||||
|
App.mpType = 'app'
|
||||||
|
const app = new Vue({
|
||||||
|
...App
|
||||||
|
})
|
||||||
|
app.$mount()
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef VUE3
|
||||||
|
import {
|
||||||
|
createSSRApp
|
||||||
|
} from 'vue'
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App);
|
const app = createSSRApp(App)
|
||||||
return { app };
|
return {
|
||||||
|
app
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// #endif
|
||||||
|
|||||||
Reference in New Issue
Block a user