0.0.2 • Published 2 years ago

@primer/react-scripts v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

 

Setup

npm install @primer/react-scripts --save-dev

Storybook

Add this script to your package.json:

{
  scripts: {
    "start": "webpack",
    "test": "jest",
+   "storybook": "prc storybook"
  }
}

To customize storybook config, create a file at .primer-scripts/storybook-main.js

// example for memex:
const defaultConfig = require('@siddharthkp/react-scripts/storybook/default-config');
const { TsconfigPathsPlugin } = require('tsconfig-paths-webpack-plugin');

module.exports = {
  // extend default config
  ...defaultConfig,

  // need to customise webpack config because we use custom resolvers for helpers/util
  webpackFinal: (webpackConfig) => {
    webpackConfig.resolve.plugins = [new TsconfigPathsPlugin({ baseUrl: './src/client' })];
    return config;
  }
};
0.0.1

2 years ago

0.0.2

2 years ago