Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
w4-vux-template
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2019-01-10 14:34:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7a744615e1ac0e88451ef69567d9b6ce9e8ab9d6
7a744615
1 parent
32c52a3e
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
24 deletions
vue.config.js
vue.config.js
View file @
7a74461
/* jshint esversion: 6 */
const
vuxLoader
=
require
(
'vux-loader'
);
const
webpack
=
require
(
'webpack'
);
const
merge
=
require
(
'webpack-merge'
);
//
const merge = require('webpack-merge');
module
.
exports
=
{
// 基本路径
...
...
@@ -48,35 +48,21 @@ module.exports = {
options
:
{},
plugins
:
[
'vux-ui'
]
});
merge
(
config
,
{
plugins
:
[
new
webpack
.
ProvidePlugin
({
$
:
'jquery'
,
jQuery
:
'jquery'
,
'_'
:
'lodash'
,
'axios'
:
'axios'
,
'moment'
:
'moment'
})
]
});
config
.
plugins
.
push
(
new
webpack
.
ProvidePlugin
({
$
:
'jquery'
,
jQuery
:
'jquery'
,
'_'
:
'lodash'
,
'axios'
:
'axios'
,
'moment'
:
'moment'
})
);
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
// 为生产环境修改配置...
}
else
{
// 为开发环境修改配置...
console
.
warn
(
merge
);
}
},
// configureWebpack: {
// plugins: [
// new webpack.ProvidePlugin({
// $: 'jquery',
// jQuery: 'jquery',
// '_': 'lodash',
// 'axios': 'axios',
// 'moment': 'moment'
// })
// ]
// },
// 是一个函数,会接收一个基于 webpack-chain 的 ChainableConfig 实例。允许对内部的 webpack 配置进行更细粒度的修改。
chainWebpack
:
()
=>
{},
// css相关配置
...
...
Please
register
or
login
to post a comment