forked from feifei1030/umi-antd-quill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.umirc.js
46 lines (40 loc) · 1 KB
/
.umirc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const webpack = require('webpack')
// ref: https://umijs.org/config/
export default {
treeShaking: true,
// react-quill issue https://github.com/zenoamaro/react-quill/issues/224
// 语法参考 https://github.com/neutrinojs/webpack-chain
chainWebpack: (config) => {
config
.plugin("ProvidePlugin")
.use(webpack.ProvidePlugin, [{
'window.Quill': 'quill',
'Quill': 'quill'
}])
config.module.rule('js').exclude.add(/node_modules(?!\/quill-image-drop-module|quill-image-resize-module)/)
},
routes: [
{
path: '/',
component: '../layouts/index',
routes: [
{ path: '/', component: '../pages/index' }
]
}
],
plugins: [
// ref: https://umijs.org/plugin/umi-plugin-react.html
['umi-plugin-react', {
antd: true,
dva: false,
dynamicImport: false,
title: 'umi-antd-quill',
dll: false,
routes: {
exclude: [
/components\//,
],
},
}],
],
}