Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
0a5480f3
Commit
0a5480f3
authored
Jul 23, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
6dba1a32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
12 deletions
+8
-12
main.js
+8
-10
vite.config.mjs
+0
-2
No files found.
main.js
View file @
0a5480f3
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
...
...
vite.config.mjs
View file @
0a5480f3
...
@@ -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: {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment