File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const paths = require('../base-config/path');
3
3
4
4
const alias = require ( './alias' ) ( paths ) ;
5
5
const base = require ( './base' ) ( paths ) ;
6
- const loaders = require ( './loaders' ) ( ) ;
6
+ const rules = require ( './loaders' ) ( ) ;
7
7
const plugins = require ( './plugins' ) ( paths ) ;
8
8
9
9
debug ( 'Creating configuration.' ) ;
@@ -14,7 +14,7 @@ module.exports = Object.assign(
14
14
alias,
15
15
} ,
16
16
module : {
17
- loaders ,
17
+ rules ,
18
18
} ,
19
19
} ,
20
20
base
Original file line number Diff line number Diff line change @@ -62,13 +62,34 @@ module.exports = () => {
62
62
{
63
63
loader : 'url-loader' ,
64
64
options : {
65
- limit : 8192 ,
65
+ limit : 1024 * 4 ,
66
66
useRelativePath : isProd ,
67
67
name : `images/[name].${ env . config . hash } .[ext]` ,
68
68
} ,
69
69
} ,
70
70
] ,
71
71
} ,
72
+ {
73
+ test : / \. ( w o f f | w o f f 2 | o t f | t t f | e o t ) ( \? .* ) ? $ / ,
74
+ use : [
75
+ {
76
+ loader : 'url-loader' ,
77
+ options : {
78
+ limit : 1024 * 10 ,
79
+ useRelativePath : isProd ,
80
+ name : `fonts/[name].${ env . config . hash } .[ext]` ,
81
+ } ,
82
+ } ,
83
+ ] ,
84
+ } ,
85
+ {
86
+ test : / \. ( t x t | s v g ) $ / ,
87
+ use : [
88
+ {
89
+ loader : 'raw-loader' ,
90
+ } ,
91
+ ] ,
92
+ } ,
72
93
] ;
73
94
if ( ! isDev ) {
74
95
debug ( 'Apply ExtractTextPlugin to CSS loaders.' ) ;
You can’t perform that action at this time.
0 commit comments