Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
xqz
/
dianDemo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c2109f0e
authored
2020-12-24 09:24:21 +0800
by
sunniejs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix config environment bug
1 parent
19d5f869
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
babel.config.js
src/api/home.js
src/config/index.js
vue.config.js
babel.config.js
View file @
c2109f0
...
...
@@ -17,6 +17,6 @@ if (IS_PROD) {
}
module
.
exports
=
{
presets
:
[[
'@vue/cli-plugin-babel/preset'
,
{
useBuiltIns
:
'usage'
,
corejs
:
3
}]],
presets
:
[[
'@vue/cli-plugin-babel/preset'
,
{
useBuiltIns
:
'usage'
,
corejs
:
3
}]],
plugins
}
...
...
src/api/home.js
View file @
c2109f0
// import qs from 'qs'
// axios
// import request from '@/utils/request'
//home api
//
home api
\ No newline at end of file
...
...
src/config/index.js
View file @
c2109f0
//
根据环境引入不同配置 process.env.NODE
_ENV
const
environment
=
process
.
env
.
NODE_ENV
||
'development
'
//
根据环境引入不同配置 process.env.VUE_APP
_ENV
const
environment
=
process
.
env
.
VUE_APP_ENV
||
'production
'
const
config
=
require
(
'./env.'
+
environment
)
module
.
exports
=
config
...
...
vue.config.js
View file @
c2109f0
...
...
@@ -8,7 +8,6 @@ const resolve = dir => path.join(__dirname, dir)
const
name
=
defaultSettings
.
title
||
'vue mobile template'
// 生产环境,测试和正式
const
IS_PROD
=
[
'production'
,
'prod'
].
includes
(
process
.
env
.
NODE_ENV
)
// externals
// const externals = {
// vue: 'Vue',
...
...
Write
Preview
Styling with
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