storiesContext.tsx 296 B

1234567
  1. export default function storiesContext() {
  2. const context = require.context('sentry', true, /\.stories.tsx$/, 'lazy');
  3. return {
  4. files: () => context.keys().map(file => file.replace(/^\.\//, 'app/')),
  5. importStory: (filename: string) => context(filename.replace(/^app\//, './')),
  6. };
  7. }