Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
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 bbb0fdb7
authored
Jul 24, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
配置
1 parent
8a4f15c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
vue.config.js
vue.config.js
View file @
bbb0fdb
...
@@ -2,12 +2,11 @@
...
@@ -2,12 +2,11 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-07-2
1 17:42:38
* @LastEditTime: 2023-07-2
4 13:51:47
* @FilePath: \scrm-micro-home\vue.config.js
* @FilePath: \scrm-micro-home\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
const
path
=
require
(
'path'
)
const
path
=
require
(
'path'
)
const
PreloadWebpackPlugin
=
require
(
'@vue/preload-webpack-plugin'
)
const
packageName
=
require
(
'./package.json'
).
name
const
packageName
=
require
(
'./package.json'
).
name
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
publicPath
=
node_env
?
`/child/
${
packageName
}
/`
:
'/'
const
publicPath
=
node_env
?
`/child/
${
packageName
}
/`
:
'/'
...
@@ -54,20 +53,25 @@ module.exports = {
...
@@ -54,20 +53,25 @@ module.exports = {
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
}
}
},
},
module
:
{
rules
:
[
{
test
:
/
\.
scss$/
,
use
:
[
'style-loader'
,
'css-loader'
,
'sass-loader'
]
},
{
test
:
/
\.(
png|svg|jpg|gif
)
$/
,
use
:
[
'url-loader'
]
}
]
},
chainWebpack
:
config
=>
{
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
).
tap
(
args
=>
{
config
.
plugin
(
'html'
).
tap
(
args
=>
{
// args[0].minify.removeComments = false;
// args[0].minify.removeComments = false;
args
[
0
].
cdn
=
cdn
args
[
0
].
cdn
=
cdn
return
args
return
args
})
})
config
.
plugin
(
'preload'
).
use
(
PreloadWebpackPlugin
,
[
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
{
rel
:
'preload'
,
include
:
'allAssets'
,
fileBlacklist
:
[
/
\.
map$/
,
/hot-update
\.
js$/
]
}
])
// config.plugins.delete('preload') // TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
module
config
.
module
.
rule
(
'fonts'
)
.
rule
(
'fonts'
)
...
...
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