Skip to content

Instantly share code, notes, and snippets.

@marklawlor
Created April 28, 2021 00:07
Show Gist options
  • Save marklawlor/9b9daf8a655d56fc98e3dc4e427c2f4e to your computer and use it in GitHub Desktop.
Save marklawlor/9b9daf8a655d56fc98e3dc4e427c2f4e to your computer and use it in GitHub Desktop.
Moti + Storybook + React-Native-Web
const path = require("path");
const { withUnimodules } = require("@expo/webpack-config/addons");
module.exports = {
stories: ["../src/**/*.stories.@(ts|tsx|js|jsx)"],
webpackFinal: async (config) => {
return withUnimodules(
config,
{
projectRoot: path.resolve(__dirname, "../"),
babel: { dangerouslyAddModulePathsToTranspile: ["moti"] },
},
{
expoConfig: {
web: {
build: {
babel: {
use: {
options: {
babelrc: false,
configFile: true,
},
},
},
},
},
},
}
);
},
};
@AlissonEnz
Copy link

It worked amazingly, thanks for sharing it 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment