Skip to content

Commit

Permalink
(migration) resolve the error ‘Module not found: Error: Can't resolve…
Browse files Browse the repository at this point in the history
… unfetch in node_modules/isomorphic-unfetch' at compile
  • Loading branch information
nozomione committed Aug 9, 2023
1 parent cd7bb6d commit 9138bdf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path')
module.exports = {
import * as path from 'path'

export default {
stories: ['./stories/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-a11y',
Expand All @@ -23,6 +24,10 @@ module.exports = {

config.resolve.modules.push(path.resolve(__dirname, './../src'))
config.resolve.alias['utils'] = path.resolve(__dirname, './utils')
config.resolve.alias['unfetch'] = path.resolve(
__dirname,
'./../node_modules/unfetch/dist/unfetch.mjs'
)
// Return the altered config
return config
}
Expand Down

0 comments on commit 9138bdf

Please sign in to comment.