0

webpack中的配置

resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
            vue$:'vue/dist/vue.runtime.common.js',
        },
    },

const vuxLoader = require('vux-loader');
const webpackConfig = config;

module.exports = vuxLoader.merge(webpackConfig, {
    plugins: ['vux-ui']
})
//module.exports = config;

webpack打包过程没有报错

-----------------------第二种------------------------

webpack中的配置

resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
            vue$:'vue/dist/vue.common.js',//注意这
        },
    },

const vuxLoader = require('vux-loader');
const webpackConfig = config;

module.exports = vuxLoader.merge(webpackConfig, {
    plugins: ['vux-ui']
})
//module.exports = config;

console没有报错了,但是页面一片空白

1 个回答

0
  alias: {
    'vue$': 'vue/dist/vue.esm.js'
  }