hookehuyr

fix

1 /* jshint esversion: 6 */ 1 /* jshint esversion: 6 */
2 const vuxLoader = require('vux-loader'); 2 const vuxLoader = require('vux-loader');
3 const webpack = require('webpack'); 3 const webpack = require('webpack');
4 -const merge = require('webpack-merge'); 4 +// const merge = require('webpack-merge');
5 5
6 module.exports = { 6 module.exports = {
7 // 基本路径 7 // 基本路径
...@@ -48,8 +48,7 @@ module.exports = { ...@@ -48,8 +48,7 @@ module.exports = {
48 options: {}, 48 options: {},
49 plugins: ['vux-ui'] 49 plugins: ['vux-ui']
50 }); 50 });
51 - merge(config, { 51 + config.plugins.push(
52 - plugins: [
53 new webpack.ProvidePlugin({ 52 new webpack.ProvidePlugin({
54 $: 'jquery', 53 $: 'jquery',
55 jQuery: 'jquery', 54 jQuery: 'jquery',
...@@ -57,26 +56,13 @@ module.exports = { ...@@ -57,26 +56,13 @@ module.exports = {
57 'axios': 'axios', 56 'axios': 'axios',
58 'moment': 'moment' 57 'moment': 'moment'
59 }) 58 })
60 - ] 59 + );
61 - });
62 if (process.env.NODE_ENV === 'production') { 60 if (process.env.NODE_ENV === 'production') {
63 // 为生产环境修改配置... 61 // 为生产环境修改配置...
64 } else { 62 } else {
65 // 为开发环境修改配置... 63 // 为开发环境修改配置...
66 - console.warn(merge);
67 } 64 }
68 }, 65 },
69 - // configureWebpack: {
70 - // plugins: [
71 - // new webpack.ProvidePlugin({
72 - // $: 'jquery',
73 - // jQuery: 'jquery',
74 - // '_': 'lodash',
75 - // 'axios': 'axios',
76 - // 'moment': 'moment'
77 - // })
78 - // ]
79 - // },
80 // 是一个函数,会接收一个基于 webpack-chain 的 ChainableConfig 实例。允许对内部的 webpack 配置进行更细粒度的修改。 66 // 是一个函数,会接收一个基于 webpack-chain 的 ChainableConfig 实例。允许对内部的 webpack 配置进行更细粒度的修改。
81 chainWebpack: () => {}, 67 chainWebpack: () => {},
82 // css相关配置 68 // css相关配置
......