Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
acharlop opened this issue Oct 22, 2024 · 1 comment
Open
1 task done

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

acharlop opened this issue Oct 22, 2024 · 1 comment
Labels
📚 documentation PRs Accepted Anyone feel free to pick this up

Comments

@acharlop
Copy link

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

  • 🙋‍♂️ Yes, I'd be down to file a PR implementing the suggested changes!
@juliusmarminge juliusmarminge added the PRs Accepted Anyone feel free to pick this up label Oct 24, 2024
@juliusmarminge
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation PRs Accepted Anyone feel free to pick this up
Projects
None yet
Development

No branches or pull requests

2 participants