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

build-storybook: cannot create property mappings #716

Closed
florian-bd opened this issue Mar 7, 2017 · 2 comments
Closed

build-storybook: cannot create property mappings #716

florian-bd opened this issue Mar 7, 2017 · 2 comments

Comments

@florian-bd
Copy link

I recently enabled webpack full-control mode.

module.exports = function(storybookConfig) {
    const fullConfig = Object.assign(storybookConfig, devConfig, {
        entry: storybookConfig.entry,
        output: storybookConfig.output,
        plugins: storybookConfig.plugins.concat(devConfig.plugins),
        module: Object.assign(storybookConfig, {
            loaders: storybookConfig.module.loaders.concat(
                devConfig.module.loaders
            )
        }),
        resolve: Object.assign(devConfig.resolve, storybookConfig.resolve, {
            alias: Object.assign(
                devConfig.resolve.alias,
                storybookConfig.resolve.alias
            )
        })
    });
    // otherwise mappings error https://github.com/babel/babel-loader/issues/390
    delete fullConfig.devtool;
    return fullConfig;
};

I had the following issue with start-storybook:
babel/babel-loader#390

I solved it by removing devtool from the webpack config.

But I still have the issue when running build-storybook.

Any idea why?

@2WheelCoder
Copy link

I had the same issue and fixed it by removing the react-hot loader before the babel loader. Not sure if you have any loaders before babel in your webpack config, but that seemed to be the issue for me. react-hot in particular is not needed when running build-storybook.

@florian-bd
Copy link
Author

I had to remove react-hotas you said, and also webpack/hot/only-dev-server in my entry point
@2WheelCoder thank you for the help!

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

No branches or pull requests

2 participants