-
-
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
Storybook not working in IE11 #4099
Comments
I tested it with my pet project on browserstack and can confirm, but with a different error in IE11:
which leads to this line of code: while the project runs in my other browsers. |
@KADlancer you will need to provide a polyfill for |
Thanks, I'm gonna try that tomorrow. I made my build with the alpha to get support for webpack 4. So far it looks good but there are a few minor things with addons I need to figure out but that's something for another issue |
Still an issue with the latest alpha? |
@ndelangen yes |
Thank you for confirming, gonna try to look into this as soon as I can. Do you happen to have a reproduction repo? |
The commands in the description create a repro project. |
I just added |
Thanks for the info @ranzwertig ! |
I have the same IE11 "problem" although it's for If you open "https://storybooks-polymer.netlify.com/" in IE11 it will now show any stories. Although the UI is fine. As its a build version + IE11 it's really tough to debug there. So if I run IE11 locally for my project I get this
so it seems lit-html does not gets correctly transpired... (e.g. IE11 can't handle arrow functions) I tried to add it to the include path (see below) but that didn't change anything - is there another place where I need to define that? or maybe is it configured to not transpile arrow function? I also tried adding So if aynone got any more ideas - I am willing to test them all out. // .storybook/webpack.config.js
const path = require('path');
module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.resolve.modules.push('bower_components');
defaultConfig.module.rules[0].include.push(path.resolve(__dirname, '../node_modules/lit-html'));
return defaultConfig;
}; // .storybook/.babelrc
{
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-object-rest-spread"
]
} Versions:
|
found a solution
and we need to exclude it from the exclude 🎉 😁 // .storybook/webpack.config.js
const path = require('path');
module.exports = (storybookBaseConfig, configType, defaultConfig) => {
defaultConfig.resolve.modules.push('bower_components');
defaultConfig.module.rules[0].exclude = /regep\/path\/to\/node_modules(?!\/lit-html)/;
return defaultConfig;
}; I will clean this exclude of exclude up later... so if anyone is interested just let me know... |
Can I suggest a |
@ndelangen find? how about something like this? // Searches through all exclude rules and replaces them if they exclude node_modules
// Replacement will exclude node_modules with the exeption of listed below packages
for (let i = 0; i < defaultConfig.module.rules.length; i += 1) {
const rule = defaultConfig.module.rules[i];
if (rule.exclude) {
for (let j = 0; j < rule.exclude.length; j += 1) {
if (rule.exclude[j] === path.resolve('node_modules')) {
rule.exclude[j] = (modulePath) => {
return /node_modules/.test(modulePath) &&
!/node_modules\/lit-html/.test(modulePath);
}
}
}
}
} |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Yes, it seems to be fixed now. |
This has regressed as of storybook 4.1 and is still occurring in the 4.2 alpha at the time of this writing. |
@pelotom I just released https://github.com/storybooks/storybook/releases/tag/v4.2.0-alpha.9 containing PR #5081 that might fix this. Give it a try? Because it's a pre-release you can find it on the |
@shilman unfortunately it doesn't seem to have fixed it. |
Just released https://github.com/storybooks/storybook/releases/tag/v4.1.9 that I'm pretty sure fixes it (just tested it with https://storybooks-official.netlify.com/). Closing this now, but ... famous last words. Please re-open if you still have problems. Fingers crossed!!! |
@shilman it's working for me again now, thanks! |
I'm experiencing this problem on 4.1.11... Too early to say it needs to be re-opened - it could be my funky TypeScript / Babel / Vue setup, but the issue looks to be the exact same at face value. Edit: Disregard - it was absolutely me - I had some TS that wasn't going through babel - works perfectly :) |
bug description fits exactly with what i get in version 5.2.1 |
@danbirle can you help us with a reproduction repo? |
yes, I'll write instructions later today / tomorrow latest; sorry for late reply |
sorry again. updated to 5.2.4 and it seems it works without a problem now. would you still like a reproduction repo? |
I've upgraded to 5.3.0-beta.22 and my storybook that was working in IE11 no longer works. Previous version was 5.2.8. |
@ndelangen how's that IE build coming? 😄 |
Using version 5.3.13 => Also not loading in IE11. Tracked the error down to the following.
After removing the option and reloading it worked again. Update:
All code needs to be in ES5. |
cc @ndelangen |
@Eldorean is this with |
@ndelangen Its with the preview.js setup. |
also not working in IE 11 for 5.1.11 |
Bug summary
It seems that something broke in
v4.0.0-alpha.16
and has remained broken throughv4.0.0-alpha.18
. Using a fresh install of storybook into a brand new CRA, the storybook doesn't load.Having done some cursory research, this issue looks potentially relevant and in particular this comment.
Steps to reproduce
Navigate to the storybook page in IE11. The page is blank, and the console has 2 instances of this error:
Please specify which version of Storybook and optionally any affected addons that you're running
Affected platforms
The text was updated successfully, but these errors were encountered: