|
- /**
- * 配置参考: https://cli.vuejs.org/zh/config/
- */
- var webpack = require('webpack');
- module.exports = {
- publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
- configureWebpack:{
- module:{
- rules:[
- {
- test: /\.js$/,
- exclude: /node_modules(?!\/quill-image-drop-module|quill-image-resize-module)/,
- loader: 'babel-loader'
- }
- ]},
- plugins: [
- new webpack.ProvidePlugin({
- 'window.Quill': 'quill/dist/quill.js',
- 'Quill': 'quill/dist/quill.js'
- })
- ]
- },
- chainWebpack: config => {
- const svgRule = config.module.rule('svg')
- svgRule.uses.clear()
- svgRule
- .test(/\.svg$/)
- .use('svg-sprite-loader')
- .loader('svg-sprite-loader')
- },
- productionSourceMap: false,
- devServer: {
- open: true,
- port: 8001,
- overlay: {
- errors: true,
- warnings: true
- }
- }
- }
|