Updated Navbar storybook to include an Image

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2021-04-01 23:34:37 +02:00
parent 031971b859
commit d2fbe42db8
6 changed files with 1055 additions and 989 deletions

View File

@ -1,4 +1,5 @@
const path = require("path");
const webpack = require('webpack')
module.exports = {
"stories": [
@ -16,5 +17,18 @@ module.exports = {
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
},
},
presets: [path.resolve(__dirname, "./next.js")]
presets: [path.resolve(__dirname, "./next.js")],
// Allow to use Next/Image
webpackFinal: (config) => {
config.plugins.push(new webpack.DefinePlugin({
'process.env.__NEXT_IMAGE_OPTS': JSON.stringify({
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
domains: [],
path: '/',
loader: 'default',
})
}))
return config
}
}