Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update with-hashed-statics example (#5100)
* Add file-loader to webpack config * Fix lint problems
- Loading branch information
1 parent
0bcee3c
commit 0fa642a
Showing
3 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
webpack: config => { | ||
config.module.rules.push({ | ||
test: /\.(txt|jpg|png|svg)$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
context: '', | ||
emitFile: true, | ||
name: '[path][name].[hash].[ext]' | ||
} | ||
} | ||
] | ||
}) | ||
|
||
return config | ||
} | ||
} |
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 |
---|---|---|
|
@@ -9,5 +9,8 @@ | |
"next": "latest", | ||
"react": "16.2.0", | ||
"react-dom": "16.2.0" | ||
}, | ||
"devDependencies": { | ||
"file-loader": "2.0.0" | ||
} | ||
} |