Skip to content
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

Storybook doesn't expect Webpack configs could have an array of loader's tests #596

Closed
sebas5384 opened this issue Nov 2, 2016 · 0 comments
Labels

Comments

@sebas5384
Copy link

In the case you have a custom Webpack configs with a test array instead of one regex, for example:

{
        test: [/react-widgets\.css$/, /outdated.css$/],
        loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[local]!postcss-loader')
},

Storybook is giving a Type error:

/Users/sebas/mywebapp/node_modules/@kadira/storybook/dist/server/config.js:101
    return value || loader.test.test('my_package.json');
                                ^

TypeError: loader.test.test is not a function

We did a workaround to solve this for now, adding the Json loader as the first module loader:

  module: {
    loaders: [
      { test: /\.json$/, loader: 'json' },

I consider it as a bug.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants