hookehuyr

fix

/* 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相关配置
......