vue-cli3.X 配置webpack

vue2.X 版本webpack配置引入第三方插件

var webpack = require('webpack');
module.exports = {
	plugins: [
	    new webpack.ProvidePlugin({
		      'window.Quill': 'quill/dist/quill.js',
		      'Quill': 'quill/dist/quill.js'
	    }),
    ]
}

vue-cli3.X 版本webpack配置引入第三方插

const webpack = require('webpack')
module.exports = {
	chainWebpack: config => {
		config.plugin('provide').use(webpack.ProvidePlugin, [{
		       'window.Quill': 'quill/dist/quill.js',
		      'Quill': 'quill/dist/quill.js'
	    }]);
	}
}
Logo

前往低代码交流专区

更多推荐