Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
aiot-develop-platform
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 02b3c06c
authored
Dec 22, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改项目路径
1 parent
06d31f84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
vue.config.js
vue.config.js
View file @
02b3c06
...
@@ -10,7 +10,7 @@ process.env.VUE_APP_VERSION = require('./package.json').version
...
@@ -10,7 +10,7 @@ process.env.VUE_APP_VERSION = require('./package.json').version
process
.
env
.
VUE_APP_BUILD_TIME
=
require
(
'dayjs'
)().
format
(
'YYYY-M-D HH:mm:ss'
)
process
.
env
.
VUE_APP_BUILD_TIME
=
require
(
'dayjs'
)().
format
(
'YYYY-M-D HH:mm:ss'
)
// 基础路径 注意发布之前要先修改这里
// 基础路径 注意发布之前要先修改这里
let
publicPath
=
'
/dj-carlife-web/
'
let
publicPath
=
'
AIoT-developer
'
const
CDN_DOMAIN
=
'https://cdn.bootcss.com'
const
CDN_DOMAIN
=
'https://cdn.bootcss.com'
const
cdn
=
{
const
cdn
=
{
css
:
[
css
:
[
...
@@ -44,7 +44,7 @@ module.exports = {
...
@@ -44,7 +44,7 @@ module.exports = {
loaderOptions
:
{
loaderOptions
:
{
// 设置 scss 公用变量文件
// 设置 scss 公用变量文件
sass
:
{
sass
:
{
data
:
'@import \'~@/assets/style/public.scss\';'
data
:
"@import '~@/assets/style/public.scss';"
}
}
}
}
},
},
...
@@ -63,7 +63,7 @@ module.exports = {
...
@@ -63,7 +63,7 @@ module.exports = {
'ua-parser-js'
:
'UAParser'
,
'ua-parser-js'
:
'UAParser'
,
'better-scroll'
:
'BScroll'
,
'better-scroll'
:
'BScroll'
,
'qs'
:
'Qs'
'qs'
:
'Qs'
// 'core-js': 'core-js'
// 'core-js': 'core-js'
}
}
// 非开发环境
// 非开发环境
if
(
process
.
env
.
NODE_ENV
!==
'development'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'development'
)
{
...
@@ -72,14 +72,14 @@ module.exports = {
...
@@ -72,14 +72,14 @@ module.exports = {
config
.
optimization
.
minimizer
[
0
].
options
.
terserOptions
.
compress
.
drop_debugger
=
true
config
.
optimization
.
minimizer
[
0
].
options
.
terserOptions
.
compress
.
drop_debugger
=
true
config
.
optimization
.
minimizer
[
0
].
options
.
terserOptions
.
compress
.
pure_funcs
=
[
'console.log'
]
config
.
optimization
.
minimizer
[
0
].
options
.
terserOptions
.
compress
.
pure_funcs
=
[
'console.log'
]
}
}
// const Plugins = [
// const Plugins = [
// new MiniCssExtractPlugin({
// new MiniCssExtractPlugin({
// // Options similar to the same options in webpackOptions.output
// // Options similar to the same options in webpackOptions.output
// // both options are optional
// // both options are optional
// filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css',
// filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css',
// chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css',
// chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css',
// })]
// })]
// config.plugins = [...config.plugins, ...Plugins]
// config.plugins = [...config.plugins, ...Plugins]
},
},
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
...
@@ -114,13 +114,13 @@ module.exports = {
...
@@ -114,13 +114,13 @@ module.exports = {
.
when
(
process
.
env
.
NODE_ENV
===
'development'
,
.
when
(
process
.
env
.
NODE_ENV
===
'development'
,
// sourcemap不包含列信息
// sourcemap不包含列信息
config
=>
config
.
devtool
(
'cheap-source-map'
)
config
=>
config
.
devtool
(
'cheap-source-map'
)
)
)
// TRAVIS 构建 vue-loader 添加 filename
// TRAVIS 构建 vue-loader 添加 filename
.
when
(
process
.
env
.
VUE_APP_BUILD_MODE
===
'TRAVIS'
||
process
.
env
.
NODE_ENV
===
'development'
,
.
when
(
process
.
env
.
VUE_APP_BUILD_MODE
===
'TRAVIS'
||
process
.
env
.
NODE_ENV
===
'development'
,
VueFilenameInjector
(
config
,
{
VueFilenameInjector
(
config
,
{
propName
:
process
.
env
.
VUE_APP_SOURCE_VIEWER_PROP_NAME
propName
:
process
.
env
.
VUE_APP_SOURCE_VIEWER_PROP_NAME
})
})
)
)
// svg
// svg
const
svgRule
=
config
.
module
.
rule
(
'svg'
)
const
svgRule
=
config
.
module
.
rule
(
'svg'
)
svgRule
.
uses
.
clear
()
svgRule
.
uses
.
clear
()
...
@@ -147,22 +147,22 @@ module.exports = {
...
@@ -147,22 +147,22 @@ module.exports = {
.
set
(
'@api'
,
resolve
(
'src/api'
))
.
set
(
'@api'
,
resolve
(
'src/api'
))
config
.
plugin
(
'html'
)
config
.
plugin
(
'html'
)
.
tap
(
args
=>
{
.
tap
(
args
=>
{
// args[0].minify.removeComments = false
;
// args[0].minify.removeComments = false
args
[
0
].
cdn
=
cdn
args
[
0
].
cdn
=
cdn
return
args
return
args
})
})
// if (process.env.NODE_ENV === 'development') {
// if (process.env.NODE_ENV === 'development') {
// config
// config
// .plugin('webpack-bundle-analyzer')
// .plugin('webpack-bundle-analyzer')
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
// }
// }
// 判断环境加入模拟数据
// 判断环境加入模拟数据
// const entry = config.entry('app')
// const entry = config.entry('app')
// if (process.env.VUE_APP_BUILD_MODE !== 'nomock') {
// if (process.env.VUE_APP_BUILD_MODE !== 'nomock') {
// entry
// entry
// .add('@/mock')
// .add('@/mock')
// .end()
// .end()
// }
// }
},
},
// i18n
// i18n
pluginOptions
:
{
pluginOptions
:
{
...
...
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