Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1183fded
authored
Jun 14, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
6684292a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
38 deletions
.gitignore
vue3-lw-pc/.gitignore
vue3-lw-pc/analyzer.html
vue3-lw-pc/package.json
vue3-lw-pc/vite.config.js
.gitignore
View file @
1183fde
...
@@ -25,4 +25,4 @@ linkwe-uniapp/unpackage/dist/
...
@@ -25,4 +25,4 @@ linkwe-uniapp/unpackage/dist/
linkwe-uniapp/js_sdk/
linkwe-uniapp/js_sdk/
linkwe-pc/discard/
linkwe-pc/discard/
node_modules/
node_modules/
vue3-lw-pc/analysis
.html
report
.html
vue3-lw-pc/.gitignore
View file @
1183fde
...
@@ -26,3 +26,4 @@ coverage
...
@@ -26,3 +26,4 @@ coverage
*.njsproj
*.njsproj
*.sln
*.sln
*.sw?
*.sw?
report.html
\ No newline at end of file
\ No newline at end of file
vue3-lw-pc/analyzer.html
deleted
100644 → 0
View file @
6684292
This diff could not be displayed because it is too large.
vue3-lw-pc/package.json
View file @
1183fde
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
"test"
:
"vite --mode=test"
,
"test"
:
"vite --mode=test"
,
"build:dev"
:
"vite build --mode=development"
,
"build:dev"
:
"vite build --mode=development"
,
"build:test"
:
"vite build --mode=test"
,
"build:test"
:
"vite build --mode=test"
,
"preview"
:
"vite preview"
"preview"
:
"vite preview"
,
"report"
:
"npm run build --report"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@element-plus/icons-vue"
:
"^2.1.0"
,
"@element-plus/icons-vue"
:
"^2.1.0"
,
...
...
vue3-lw-pc/vite.config.js
View file @
1183fde
...
@@ -81,35 +81,35 @@ export default defineConfig(async ({ command, mode }) => {
...
@@ -81,35 +81,35 @@ export default defineConfig(async ({ command, mode }) => {
drop_debugger
:
true
,
drop_debugger
:
true
,
},
},
},
},
rollupOptions
:
{
//
rollupOptions: {
// vite打包是通过rollup来打包的
//
// vite打包是通过rollup来打包的
output
:
{
//
output: {
manualChunks
:
(
id
)
=>
{
//
manualChunks: (id) => {
// 可以在这里打印看一下id的值,这里将node_modules中的包打包为 chunk-libs 文件
//
// 可以在这里打印看一下id的值,这里将node_modules中的包打包为 chunk-libs 文件
// console.log(id)
//
// console.log(id)
if
(
id
.
includes
(
'benz-amr-recorder'
))
{
//
if (id.includes('benz-amr-recorder')) {
return
'benz-amr-recorder'
//
return 'benz-amr-recorder'
}
else
if
(
id
.
includes
(
'aliyun-oss-sdk'
))
{
//
} else if (id.includes('aliyun-oss-sdk')) {
return
'aliyun-oss-sdk'
//
return 'aliyun-oss-sdk'
}
else
if
(
id
.
includes
(
'echarts'
))
{
//
} else if (id.includes('echarts')) {
return
'echarts'
//
return 'echarts'
}
else
if
(
id
.
includes
(
'element-plus'
))
{
//
} else if (id.includes('element-plus')) {
return
'element-plus'
//
return 'element-plus'
}
else
if
(
id
.
includes
(
'node_modules'
))
{
//
} else if (id.includes('node_modules')) {
return
'chunk-libs'
//
return 'chunk-libs'
}
else
if
(
id
.
includes
(
'src/components'
))
{
//
} else if (id.includes('src/components')) {
return
'chunk-components'
//
return 'chunk-components'
}
//
}
// else if (id.includes('views/')) {
//
// else if (id.includes('views/')) {
// let first = id.split('views/')[1]
//
// let first = id.split('views/')[1]
// if (first.includes('/')) {
//
// if (first.includes('/')) {
// return first.match(/(\w+)\/(\w+)/)[0].replace('/', '-') // a/b/c... a-b
//
// return first.match(/(\w+)\/(\w+)/)[0].replace('/', '-') // a/b/c... a-b
// }
//
// }
// return first.split('.')[0] // a.vue a
//
// return first.split('.')[0] // a.vue a
// }
//
// }
},
//
},
},
//
},
},
//
},
},
},
plugins
:
[
plugins
:
[
// '@vue/babel-plugin-jsx',
// '@vue/babel-plugin-jsx',
...
@@ -169,13 +169,14 @@ export default defineConfig(async ({ command, mode }) => {
...
@@ -169,13 +169,14 @@ export default defineConfig(async ({ command, mode }) => {
// },
// },
],
],
}),
}),
rollupPluginVisualizer
({
process
.
env
.
npm_config_report
&&
emitFile
:
false
,
//使用 emitFile 生成文件。 属性为 true,打包后的分析文件会出现在打包好的文件包下;设置为 false ,则会出现在项目根目录下
rollupPluginVisualizer
({
filename
:
'analysis.html'
,
//生成分析网页文件名
emitFile
:
false
,
//使用 emitFile 生成文件。 属性为 true,打包后的分析文件会出现在打包好的文件包下;设置为 false ,则会出现在项目根目录下
open
:
true
,
//在默认用户代理中打开生成的文件
filename
:
'report.html'
,
//生成分析网页文件名
gzipSize
:
true
,
//从源代码中收集 gzip 大小并将其显示在图表中
open
:
true
,
//在默认用户代理中打开生成的文件
// brotliSize: true, //从源代码中收集 brotli 大小并将其显示在图表中
gzipSize
:
true
,
//从源代码中收集 gzip 大小并将其显示在图表中
}),
// brotliSize: true, //从源代码中收集 brotli 大小并将其显示在图表中
}),
],
],
// optimizedeps: {
// optimizedeps: {
// esbuildoptions: {
// esbuildoptions: {
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment