Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linweijiong
jinfa-platform
Commits
4b4bd0b2
Commit
4b4bd0b2
authored
Nov 19, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 优化构建
parent
7beefd79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
config.ts
config/config.ts
+9
-3
No files found.
config/config.ts
View file @
4b4bd0b2
...
...
@@ -12,10 +12,16 @@ const isProduction = process.env.NODE_ENV === 'production' ? true : false;
// 构建时带上的环境变量
const
PRO_ENV
=
process
.
env
.
PRO_ENV
if
(
!
PRO_ENV
)
{
throw
`请传入PRO_ENV`
if
(
PRO_ENV
)
{
const
envs
=
envValue
[
PRO_ENV
]
if
(
envs
)
{
Object
.
keys
(
envs
).
forEach
(
key
=>
{
process
.
env
[
key
]
=
envs
[
key
]
})
}
}
else
{
console
.
warn
(
'未传入PRO_ENV, 如果是 yarn的时候出现 可以忽略'
)
}
setEnv
(
getEnv
(
envValue
))
const
config
:
any
=
{
// 如需写入环境变量 需在config中先写入
...
...
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