Skip to content

Commit

Permalink
Merge pull request #1362 from oasisprotocol/mz/story
Browse files Browse the repository at this point in the history
Fix Storybook build
  • Loading branch information
buberdds authored Apr 3, 2024
2 parents 2912ab8 + da289f5 commit 12e6c6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/1362.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix Storybook build
11 changes: 11 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import path from 'path'
import type { StorybookConfig } from '@storybook/react-webpack5'

const appSource = path.resolve(__dirname, '../src/app')

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
staticDirs: ['./public'],
Expand Down Expand Up @@ -41,6 +44,14 @@ const config: StorybookConfig = {
webpackFinal: async config => {
return {
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve?.alias,
'app/hooks': path.resolve(appSource, 'hooks'),
'app/components': path.resolve(appSource, 'components'),
},
},
module: {
...config.module,
unknownContextCritical: false,
Expand Down

0 comments on commit 12e6c6f

Please sign in to comment.