mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-29 09:55:43 +08:00
Update comments for webpack loaders
This commit is contained in:
@@ -112,20 +112,14 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
loaders: [
|
||||
// Default loader: load all assets that are not handled
|
||||
// by other loaders with the url loader.
|
||||
// Note: This list needs to be updated with every change of extensions
|
||||
// the other loaders match.
|
||||
// E.g., when adding a loader for a new supported file extension,
|
||||
// we need to add the supported extension to this loader too.
|
||||
// Add one new line in `exclude` for each loader.
|
||||
//
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
// "url" loader works like "file" loader except that it embeds assets
|
||||
// smaller than specified limit in bytes as data URLs to avoid requests.
|
||||
// A missing `test` is equivalent to a match.
|
||||
// ** ADDING/UPDATING LOADERS **
|
||||
// The "url" loader handles all assets unless explicitly excluded.
|
||||
// The `exclude` list *must* be updated with every change to loader extensions.
|
||||
// When adding a new loader, you must add its `test`
|
||||
// as a new entry in the `exclude` list for "url" loader.
|
||||
|
||||
// "url" loader embeds assets smaller than specified size as data URLs to avoid requests.
|
||||
// Otherwise, it acts like the "file" loader.
|
||||
{
|
||||
exclude: [
|
||||
/\.html$/,
|
||||
@@ -179,6 +173,8 @@ module.exports = {
|
||||
name: 'static/media/[name].[hash:8].[ext]'
|
||||
}
|
||||
}
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Remember to add the new extension(s) to the "url" loader exclusion list.
|
||||
]
|
||||
},
|
||||
// @remove-on-eject-begin
|
||||
|
||||
@@ -120,18 +120,14 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
loaders: [
|
||||
// Default loader: load all assets that are not handled
|
||||
// by other loaders with the url loader.
|
||||
// Note: This list needs to be updated with every change of extensions
|
||||
// the other loaders match.
|
||||
// E.g., when adding a loader for a new supported file extension,
|
||||
// we need to add the supported extension to this loader too.
|
||||
// Add one new line in `exclude` for each loader.
|
||||
//
|
||||
// "file" loader makes sure those assets end up in the `build` folder.
|
||||
// When you `import` an asset, you get its filename.
|
||||
// "url" loader works just like "file" loader but it also embeds
|
||||
// assets smaller than specified size as data URLs to avoid requests.
|
||||
// ** ADDING/UPDATING LOADERS **
|
||||
// The "url" loader handles all assets unless explicitly excluded.
|
||||
// The `exclude` list *must* be updated with every change to loader extensions.
|
||||
// When adding a new loader, you must add its `test`
|
||||
// as a new entry in the `exclude` list in the "url" loader.
|
||||
|
||||
// "url" loader embeds assets smaller than specified size as data URLs to avoid requests.
|
||||
// Otherwise, it acts like the "file" loader.
|
||||
{
|
||||
exclude: [
|
||||
/\.html$/,
|
||||
@@ -189,6 +185,8 @@ module.exports = {
|
||||
name: 'static/media/[name].[hash:8].[ext]'
|
||||
}
|
||||
}
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Remember to add the new extension(s) to the "url" loader exclusion list.
|
||||
]
|
||||
},
|
||||
// @remove-on-eject-begin
|
||||
|
||||
Reference in New Issue
Block a user