Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make comment style consistent between prod and dev webpack configs
  • Loading branch information
andreypopp committed Aug 12, 2016
commit 58232c59665a1125d2ffe7cc0c21bef4bbbe77a3
8 changes: 4 additions & 4 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ module.exports = {
loader: ExtractTextPlugin.extract('style', 'css?-autoprefixer!postcss')
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
},
// JSON is not enabled by default in Webpack but both Node and Browserify
// allow it implicitly so we also enable it.
{
// JSON is not enabled by default in Webpack but both Node and Browserify
// allow it implicitly so we also enable it.
test: /\.json$/,
include: [paths.appSrc, paths.appNodeModules],
loader: 'json'
},
// "file" loader makes sure those assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
{
// "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|svg|ttf|woff|woff2)(\?.*)?$/,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally favicon.ico specifically should end up in root build output folder so that browser see it even for files requested from the domain. (Not a big deal but still.)

We could declare a loader entry specifically for it with hardcoded name. However we would have to exclude hash from its name—otherwise it defeats the point. But then we don’t have a way to bump cache. I wonder if Webpack understands name: 'favicon.ico?[hash:8].

Copy link
Contributor Author

@andreypopp andreypopp Aug 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if Webpack understands name: 'favicon.ico?[hash:8]

It does!

exclude: /\/favicon.ico$/,
include: [paths.appSrc, paths.appNodeModules],
Expand Down