Describe the bug
I installed the beta of Storybook 5.2 and ran the codmod to update our stories. Everything seemed to work just fine, except all of my components now have a story called __esModule. Clicking on this story displays an error message: Attempted to set a non-object key in a WeakMap (screenshots below)
Screenshots

Storybook config file:
import { configure, addDecorator, addParameters } from '@storybook/react';
import { jsxDecorator } from 'storybook-addon-jsx';
import { withA11y } from '@storybook/addon-a11y';
import { withKnobs } from '@storybook/addon-knobs';
import theme from './theme';
import icons from '!!raw-loader!../dist/icons.svg'
addDecorator(jsxDecorator);
addDecorator(withA11y);
addDecorator(withKnobs);
const req = require.context("../src", true, /.stories.js$/);
function loadStories() {
const div = document.createElement('div');
div.style.cssText = 'display:none;';
div.innerHTML = icons;
document.body.appendChild(div);
return require.context('../src', true, /\.stories\.js$/)
}
addParameters({
options: {
theme: theme
}
});
configure(loadStories(), module);
System:
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Binaries:
Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
Yarn: 1.16.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.15.1/bin/npm
Browsers:
Chrome: 75.0.3770.142
Firefox: 64.0
Safari: 12.1.1
npmPackages:
@storybook/addon-a11y: ^5.2.0-beta.24 => 5.2.0-beta.24
@storybook/addon-knobs: ^5.2.0-beta.24 => 5.2.0-beta.24
@storybook/addon-viewport: ^5.2.0-beta.24 => 5.2.0-beta.24
@storybook/react: ^5.2.0-beta.24 => 5.2.0-beta.24
@storybook/theming: ^5.2.0-beta.24 => 5.2.0-beta.24
Describe the bug
I installed the beta of Storybook 5.2 and ran the codmod to update our stories. Everything seemed to work just fine, except all of my components now have a story called
__esModule. Clicking on this story displays an error message:Attempted to set a non-object key in a WeakMap(screenshots below)Screenshots

Storybook config file:
System: