Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tuia-robot-manager-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨贺晨吉
tuia-robot-manager-node
Commits
adf8c07b
Commit
adf8c07b
authored
Sep 19, 2023
by
杨贺晨吉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 1;
parent
a0021f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
vue.config.js
vue.config.js
+3
-6
No files found.
vue.config.js
View file @
adf8c07b
...
@@ -13,7 +13,6 @@ const resolve = dir => {
...
@@ -13,7 +13,6 @@ const resolve = dir => {
* 我们可以根据环境变量进行相应的处理,只有在产品的时候,才让插件去自动注入相应的资源文件到html页面
* 我们可以根据环境变量进行相应的处理,只有在产品的时候,才让插件去自动注入相应的资源文件到html页面
*/
*/
const
enableProduction
=
process
.
env
.
NODE_ENV
===
"prod"
;
// 是否生产环境
const
enableProduction
=
process
.
env
.
NODE_ENV
===
"prod"
;
// 是否生产环境
let
externals
=
{
let
externals
=
{
vue
:
"Vue"
,
vue
:
"Vue"
,
axios
:
"axios"
,
axios
:
"axios"
,
...
@@ -80,11 +79,10 @@ module.exports = {
...
@@ -80,11 +79,10 @@ module.exports = {
}
}
},
},
devServer
:
{
devServer
:
{
open
:
true
,
port
:
configs
.
port
,
port
:
configs
.
port
,
proxy
:
{
proxy
:
{
"/"
:
{
"/"
:
{
target
:
'http
://robot.tuiatest.cn
'
,
target
:
'http
s://mall.jiliang666.com
'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
// 只需要添加该方法,然后当请求的是html,则重定向到index.html
// 只需要添加该方法,然后当请求的是html,则重定向到index.html
bypass
:
function
(
req
,
res
,
proxyOptions
)
{
bypass
:
function
(
req
,
res
,
proxyOptions
)
{
...
@@ -115,12 +113,11 @@ module.exports = {
...
@@ -115,12 +113,11 @@ module.exports = {
threshold
:
10240
// 对超过10k文件压缩
threshold
:
10240
// 对超过10k文件压缩
})
})
],
],
output
:
enableProduction
?
{
output
:
{
path
:
path
.
resolve
(
__dirname
,
'dist/'
),
path
:
path
.
resolve
(
__dirname
,
'dist/'
),
filename
:
'assets/js/[name].[hash].js'
,
filename
:
'assets/js/[name].[hash].js'
,
chunkFilename
:
'assets/js/[name].[hash].js'
chunkFilename
:
'assets/js/[name].[hash].js'
}
:
{},
},
optimization
:
{
optimization
:
{
runtimeChunk
:
"single"
,
runtimeChunk
:
"single"
,
minimizer
:
jsPlugin
,
minimizer
:
jsPlugin
,
...
...
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