@@ -115,20 +115,14 @@ module.exports = {
115
115
}
116
116
] ,
117
117
loaders : [
118
- // Default loader: load all assets that are not handled
119
- // by other loaders with the url loader.
120
- // Note: This list needs to be updated with every change of extensions
121
- // the other loaders match.
122
- // E.g., when adding a loader for a new supported file extension,
123
- // we need to add the supported extension to this loader too.
124
- // Add one new line in `exclude` for each loader.
125
- //
126
- // "file" loader makes sure those assets get served by WebpackDevServer.
127
- // When you `import` an asset, you get its (virtual) filename.
128
- // In production, they would get copied to the `build` folder.
129
- // "url" loader works like "file" loader except that it embeds assets
130
- // smaller than specified limit in bytes as data URLs to avoid requests.
131
- // A missing `test` is equivalent to a match.
118
+ // ** ADDING/UPDATING LOADERS **
119
+ // The "url" loader handles all assets unless explicitly excluded.
120
+ // The `exclude` list *must* be updated with every change to loader extensions.
121
+ // When adding a new loader, you must add its `test`
122
+ // as a new entry in the `exclude` list for "url" loader.
123
+
124
+ // "url" loader embeds assets smaller than specified size as data URLs to avoid requests.
125
+ // Otherwise, it acts like the "file" loader.
132
126
{
133
127
exclude : [
134
128
/ \. h t m l $ / ,
@@ -182,6 +176,8 @@ module.exports = {
182
176
name : 'static/media/[name].[hash:8].[ext]'
183
177
}
184
178
}
179
+ // ** STOP ** Are you adding a new loader?
180
+ // Remember to add the new extension(s) to the "url" loader exclusion list.
185
181
]
186
182
} ,
187
183
// @remove -on-eject-begin
0 commit comments