Skip to content

Instantly share code, notes, and snippets.

@cinkagan
Created September 7, 2022 22:05
Show Gist options
  • Save cinkagan/b25e9e3143e982291af7696c0e62dc63 to your computer and use it in GitHub Desktop.
Save cinkagan/b25e9e3143e982291af7696c0e62dc63 to your computer and use it in GitHub Desktop.
React-Native + React JS StoryBook
const custom = require("../webpack.config.js");
module.exports = {
stories: ["../src/**/*.stories.tsx"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app",
],
framework: "@storybook/react",
webpackFinal: async (config) => {
const temp = {
...config,
resolve: {
...config.resolve,
modules: [...custom.resolve.modules],
alias: { ...config.resolve.alias, ...custom.resolve.alias },
},
module: { ...config.module, rules: custom.module.rules },
};
return temp;
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment