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:10:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
32c52a3ef7ca98b7433ae76e9978d347b90f505a
32c52a3e
1 parent
203a0aca
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
vue.config.js
vue.config.js
View file @
32c52a3
...
...
@@ -43,29 +43,29 @@ module.exports = {
// vux 相关配置,使用vux-ui
// 如果这个值是一个对象,则会通过 webpack-merge 合并到最终的配置中。
// 如果这个值是一个函数,则会接收被解析的配置作为参数。该函数及可以修改配置并不返回任何东西,也可以返回一个被克隆或合并过的配置版本。
//
configureWebpack: config => {
//
vuxLoader.merge(config, {
//
options: {},
//
plugins: ['vux-ui']
//
});
// //
merge(config, {
// //
plugins: [
// //
new webpack.ProvidePlugin({
// //
$: 'jquery',
// //
jQuery: 'jquery',
// //
'_': 'lodash',
// //
'axios': 'axios',
// //
'moment': 'moment'
// //
})
// //
]
// //
});
//
if (process.env.NODE_ENV === 'production') {
//
// 为生产环境修改配置...
//
} else {
//
// 为开发环境修改配置...
//
console.warn(merge);
//
}
//
},
configureWebpack
:
config
=>
{
vuxLoader
.
merge
(
config
,
{
options
:
{},
plugins
:
[
'vux-ui'
]
});
merge
(
config
,
{
plugins
:
[
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({
...
...
Please
register
or
login
to post a comment