Skip to content

Commit 86a5f7a

Browse files
committed
fix webpack config for storybook
1 parent c129748 commit 86a5f7a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.storybook/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const sass = require("sass");
22
const sassRenderSyncConfig = require("./../scripts/sassConfig");
3+
const path = require("path");
34
module.exports = {
45
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
56
addons: [
@@ -84,6 +85,11 @@ module.exports = {
8485
return rule;
8586
}),
8687
];
88+
config.resolve.alias = {
89+
...config.resolve.alias,
90+
// Fix nasty bug with importing from this package, Storybook webpack cannot resolve it otherwise
91+
"@codemirror/legacy-modes": path.resolve(__dirname, "../node_modules/@codemirror/legacy-modes"),
92+
};
8793
return config;
8894
},
8995
docs: {

0 commit comments

Comments
 (0)