babel-plugin-require-context-hook icon indicating copy to clipboard operation
babel-plugin-require-context-hook copied to clipboard

Support `req.resolve(key)`

Open Hypnosphi opened this issue 4 years ago • 2 comments

See https://webpack.js.org/guides/dependency-management/#context-module-api

Hypnosphi avatar Sep 05 '19 03:09 Hypnosphi

I'm wondering what the status of this PR is?

It looks like it is a blocker for Storybook - https://github.com/storybookjs/storybook/issues/7697#issuecomment-528150781

There's a workaround in Storybook - updating jest.config.js like so -

transform: {
  // should be above any other js transform like babel-jest
  '^.+\\.stories\\.js$': '<rootDir>/path/to/injectFileName',
}

but it seems that workaround doesn't work for Create React App users who can't edit their jest config:

https://github.com/storybookjs/storybook/issues/9946

(So I'm wondering if merging this would help with the above CRA issue.)

techieshark avatar Mar 27 '20 00:03 techieshark

Is this PR able to be merged?

luke-j avatar May 01 '20 01:05 luke-j