Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,31 @@ module.exports = {
// allow it implicitly so we also enable it.
{
test: /\.json$/,
exclude: /\/manifest\.json$/,
loader: 'json'
},
// A special case for manifest.json to place it into build root directory.
{
test: /\/manifest\.json$/,
loader: 'file',
query: {
name: 'manifest.json?[hash:8]'
}
},
// "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.
{
test: /\.(ico|jpg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/,
exclude: /\/favicon.ico$/,
exclude: /\/favicon\.ico$/,
loader: 'file',
query: {
name: 'static/media/[name].[hash:8].[ext]'
}
},
// A special case for favicon.ico to place it into build root directory.
{
test: /\/favicon.ico$/,
test: /\/favicon\.ico$/,
include: [paths.appSrc],
loader: 'file',
query: {
Expand Down
13 changes: 11 additions & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,30 @@ module.exports = {
// allow it implicitly so we also enable it.
{
test: /\.json$/,
exclude: /\/manifest\.json$/,
loader: 'json'
},
// A special case for manifest.json to place it into build root directory.
{
test: /\/manifest\.json$/,
loader: 'file',
query: {
name: 'manifest.json?[hash:8]'
}
},
// "file" loader makes sure those assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
{
test: /\.(ico|jpg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/,
exclude: /\/favicon.ico$/,
exclude: /\/favicon\.ico$/,
loader: 'file',
query: {
name: 'static/media/[name].[hash:8].[ext]'
}
},
// A special case for favicon.ico to place it into build root directory.
{
test: /\/favicon.ico$/,
test: /\/favicon\.ico$/,
include: [paths.appSrc],
loader: 'file',
query: {
Expand Down