-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use hashed assets for all env (#653)
* Use hashed assets for all env * Remove redundant env var * Disable chunkhash only for hmr
- Loading branch information
1 parent
aaa876f
commit bddfb95
Showing
3 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const { env, output } = require('../configuration.js') | ||
const { output } = require('../configuration.js') | ||
|
||
module.exports = { | ||
test: /\.(jpg|jpeg|png|gif|svg|eot|ttf|woff|woff2)$/i, | ||
|
@@ -7,7 +7,7 @@ module.exports = { | |
options: { | ||
// Set publicPath with ASSET_HOST env if available so internal assets can use CDN | ||
publicPath: output.publicPathWithHost, | ||
name: env.NODE_ENV === 'production' ? '[name]-[hash].[ext]' : '[name].[ext]' | ||
name: '[name]-[hash].[ext]' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gauravtiwari
Author
Member
|
||
} | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm curious as to why we're hashing in development and test, other than to simplify the settings.