pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
4.27k stars 319 forks source link

docs: Using withUt with storybook in next.js #1023

Open acharlop opened 1 month ago

acharlop commented 1 month ago

Area of Improvement

Since the plugin uses imports from node:path and node:module storybook webpack doesn't know about these imports so add the following:

// .storybook/main.(j|t)s
webpackFinal: async (config) => {
    // ... any other webpack stuff 
    config.externals = config.externals || {}
    Object.assign(config.externals, {
      'node:path': 'path',
      'node:module': 'module',
    })

    return config
  },

Link to related docs

No response

Additional information

Package versions

@uploadthing/react: ^7.0.3 => 7.0.3 uploadthing: ^7.1.0 => 7.1.0

๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributing

juliusmarminge commented 1 month ago

Can be a good callout to make in https://docs.uploadthing.com/concepts/theming#configuring-tailwind-css