Commit 0fa642aa authored by Giovanni Giordano's avatar Giovanni Giordano Committed by Tim Neutkens

Update with-hashed-statics example (#5100)

* Add file-loader to webpack config

* Fix lint problems
parent 0bcee3c2
{
"presets": ["next/babel"],
"plugins": [
[
"transform-assets",
{
"extensions": ["txt", "svg", "png"],
"regExp": ".*/static/(.+)",
"name": "/static/[1]?[sha512:hash:base64:7]"
}
]
]
}
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
}
}
......@@ -9,5 +9,8 @@
"next": "latest",
"react": "16.2.0",
"react-dom": "16.2.0"
},
"devDependencies": {
"file-loader": "2.0.0"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment