storybookjs / addon-react-native-web

Build react-native-web projects in Storybook for React
MIT License
83 stars 24 forks source link

Support for 7.0 beta #47

Closed blwinters closed 1 year ago

blwinters commented 1 year ago

I'm currently looking into upgrading to Storybook v7 beta because it resolves some dependency vulnerabilities. However, when I try to run it I get this error in the Storybook UI.

Module parse failed: Unexpected token (14:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

This isn't an urgent matter for me since it's only for resolving a dev dependency vulnerability (thanks Dependabot...), but for clarity, does anyone have this addon working with the 7.0 beta? Any migration steps related to webpack that I should try?

dannyhw commented 1 year ago

That error doesn't seem related to this addon, thats common when a package is being used that isn't transpiled. I've actually been planning to update the project example to v7 beta soon. Might have some time this weekend.

natsuki-ornikar commented 1 year ago

Hi, do we have updates about support for 7.0 beta? I've just seen this migration guide providing an example to update the babel config:

// babel.config.js
module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        shippedProposals: true,
        useBuiltIns: 'usage',
        corejs: '3',
        modules: false,
        targets: { chrome: '100' },
      },
    ],
  ],
};

I'll try to make a PR if the babel config works. Other look-alike migration PR.

dannyhw commented 1 year ago

@natsuki-ornikar Hey sorry I didn't get around to doing this yet and I've been focused on @storybook/react-native but I'm planning to catch up on this stuff this week or next.

If you make a PR I'm more than happy to review and merge it 🙏