Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
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
6e87aad1
authored
2019-11-08 12:00:07 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
23fa7002
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
.env.development
.env.prod
.env.production
vue.config.js
.env.development
0 → 100644
View file @
6e87aad
NODE_ENV = 'development'
VUE_APP_TITLE = 'development'
.env.prod
deleted
100644 → 0
View file @
23fa700
NODE_ENV = 'prod'
VUE_APP_TITLE = 'prod'
.env.production
0 → 100644
View file @
6e87aad
NODE_ENV = 'production'
VUE_APP_TITLE = 'dist'
vue.config.js
View file @
6e87aad
...
...
@@ -13,7 +13,7 @@ let plugins = [
})
];
if
(
process
.
env
.
NODE_ENV
===
'dev'
)
{
if
(
process
.
env
.
NODE_ENV
===
'dev
elopment
'
)
{
// 开发环境
}
else
{
// 生产环境 个沙箱
...
...
@@ -21,7 +21,7 @@ if (process.env.NODE_ENV === 'dev') {
// seo插件
plugins
.
push
(
new
PrerenderSPAPlugin
({
staticDir
:
path
.
join
(
__dirname
,
webpack_public_path
||
'dist'
),
// 如果没配置环境目录(生产),则写到目录dist
staticDir
:
path
.
join
(
__dirname
,
webpack_public_path
==
""
||
'dist'
),
// 如果没配置环境目录(生产),则写到目录dist
routes
:
[
'/'
,
'/demo'
,
'/about'
],
// 需要seo的目录 临时占位,后期再进行配置
renderer
:
new
Renderer
({
inject
:
{
...
...
@@ -84,7 +84,7 @@ module.exports = {
//例如 https://www.my-app.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.my-app.com/my-app/,则设置 baseUrl 为 /my-app/。
//baseUrl 从 Vue CLI 3.3 起已弃用,请使用publicPath
//baseUrl: process.env.NODE_ENV === "production" ? "./" : "/",
publicPath
:
process
.
env
.
NODE_ENV
===
"dev"
?
"/"
:
"./"
,
publicPath
:
process
.
env
.
NODE_ENV
===
"dev
elopment
"
?
"/"
:
"./"
,
// outputDir: 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)
outputDir
:
webpack_public_path
,
...
...
Please
register
or
sign in
to post a comment