storybook not working (IE11 & chromium)
See original GitHub issueDescribe the bug Runing storybook on chrome works perfectly. Howerver not on IE 11 and chromium.
IE 11 :
Chromium:
To Reproduce Launch storybook on IE11 or chromium.
Expected behavior Storybook should works on IE11 and chromium.
Code snippets storybook webpack config :
// Export a function. Accept the base config as the only param.
module.exports = async ({ config }) => {
config.module.rules.push({
test: /\.scss$/,
use: [
// Creates `style` nodes from JS strings
'style-loader',
// Translates CSS into CommonJS
'css-loader',
// Compiles Sass to CSS
'sass-loader',
],
});
config.module.rules.push({
test: /\.(js|jsx)$/,
exclude: /node_modules\/(?!(my-core-lib)\/).*/,
use: {
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-react',
[
'@babel/preset-env'
],
],
plugins: [
"@babel/plugin-transform-arrow-functions",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-react-jsx"
]
}
},
});
config.resolve.extensions.push(".js", ".jsx");
// Return the altered config
return config;
};
addon.js :
import 'storybook-readme/register';
import '@storybook/addon-options/register';
import '@storybook/addon-actions/register';
storybook config :
import { addDecorator, configure } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { setConsoleOptions } from '@storybook/addon-console';
// setup storybook page css
import './index.css';
// set console options
setConsoleOptions({
panelExclude: [],
});
// settings
addDecorator(
withInfo({
maxPropsIntoLine: 1,
name: 'React Components',
url: 'xxx',
goFullScreen: false,
showStoriesPanel: true,
showAddonPanel: true,
showSearchBox: false,
addonPanelInRight: true,
sortStoriesByKind: true,
inline: true,
header: false,
source: true,
styles: (stylesheet) => {
const style = {
...stylesheet,
infoBody: {
padding: '10px',
},
};
return style;
},
}),
);
const req = require.context('..', true, /\.jsx$/);
function loadStories(){
req.keys().forEach((filename) => req(filename));
}
configure(loadStories, module);
I tried to use babel config like useBuiltIns & coreJS & module. but the same issue. I also tried suggested solution on others thread.
System:
Environment Info:
System:
OS: Windows 10 10.0.17134
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Binaries:
Node: 10.13.0
npm: 6.4.1
Browsers:
Edge: 42.17134.1098.0
Storybook version :
"@storybook/addon-actions": "=5.2.6",
"@storybook/addon-console": "=1.2.1",
"@storybook/addon-info": "=5.2.6",
"@storybook/addon-knobs": "=5.2.6",
"@storybook/addon-links": "=5.2.6",
"@storybook/addon-options": "=5.2.6",
"@storybook/addons": "=5.2.6",
"@storybook/react": "=5.2.6",
Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:45 (20 by maintainers)
Top Results From Across the Web
Babel - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >Not working in IE11 for new create-react-app project #12179
Describe the bug Cannot run StoryBook for a create-react-app project in Storybook on IE11. To Reproduce. npx create-react-app storybook-ie-issue ...
Read more >Trouble with storybook in IE11. "WeakSet is not defined"
I have a trouble with running storybook in IE11 ...
Read more >Browsers • Chromatic docs
From now on, our Capture Cloud will spin up as many Chrome, Firefox, or IE11 machines as you need to test your Storybook...
Read more >Getting started / Browser support - Page ⋅ Storybook - WFP
Please notice that the UI Kit currently supports IE11, but it will no longer do it in future releases. Those applications that do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
got it working!
(dll must be enabled)
@ndelangen Another IE issue 🤦♂