feat: Moved to vite

Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
2022-09-27 12:56:56 +02:00
parent 895716cff0
commit b43329caa1
21 changed files with 3960 additions and 5908 deletions

View File

@ -1,12 +1,9 @@
const path = require("path");
const webpack = require('webpack')
module.exports = {
"stories": [
"../src/**/*.stories.tsx",
],
core: {
builder: "webpack5"
builder: "@storybook/builder-vite"
},
staticDirs: ["./public"],
"addons": [
@ -23,19 +20,5 @@ module.exports = {
shouldExtractLiteralValuesFromEnum: true,
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
},
},
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
}
}