Skip to content

Commit

Permalink
fix webpack config for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
haschek committed Dec 17, 2024
1 parent c129748 commit 86a5f7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const sass = require("sass");
const sassRenderSyncConfig = require("./../scripts/sassConfig");
const path = require("path");
module.exports = {
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
Expand Down Expand Up @@ -84,6 +85,11 @@ module.exports = {
return rule;
}),
];
config.resolve.alias = {
...config.resolve.alias,
// Fix nasty bug with importing from this package, Storybook webpack cannot resolve it otherwise
"@codemirror/legacy-modes": path.resolve(__dirname, "../node_modules/@codemirror/legacy-modes"),
};
return config;
},
docs: {
Expand Down

0 comments on commit 86a5f7a

Please sign in to comment.