-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex.test is not a function #607
Comments
Could you send me a copy of your custom webpack config? |
I just submitted a PR that fixes it. Btw I'm using custom-react-scripts. This is the webpack config. |
Hmm. I couldn't find the issue by looking at the source. Seems everything fine for me. Also could you tell me how to re-produce with this custom scripts? |
Oh, I see the problem. This has nothing to do with react-custom-scripts and that webpack.config file. My webpack config for storybook includes a test that's not a regex, but it's a function. I don't know if you know that "test" accepts both a regex and a function. So that's where it crashes. |
I just updated the PR with this commit. The thing here is that if the test is a regex, it should be tested, as it was, but if it's a function, it should be also called with the "my_package.json" parameter. |
@kadira/storybook v2.29.3
=> Loading custom .babelrc
=> Loading custom webpack config.
/Users/kitze/webdev/personal/x/client/node_modules/@kadira/storybook/dist/server/config.js:102
return regex.test('my_package.json');
^
TypeError: regex.test is not a function
Got this error with the newest version of storybook. Am I doing something wrong?
The text was updated successfully, but these errors were encountered: