-
-
Notifications
You must be signed in to change notification settings - Fork 432
Shimport not transpiled #1544
Comments
This seems more likely to be an issue in the template or in https://github.com/antony/sapper-ie than in Sapper. I don't think anything changed in Sapper other than upgrading the version of Shimport and Shimport has had I thought |
I'm not running sapper-ie, I'm using the official template. That error is from a degit and build and node__sapper__/server of sapper-template |
Maybe we need to update the official template to match sapper-ie? I see the official template has |
Btw 'Const' is probably not the issue, it's unreliable in IE but does work. But there is an issue with the code, hence the error. Ie makes it hard to diagnose as it doesn't show a character reliably. |
So I've tried this and it didn't help. Rollup never sees shimport. I'm trying to find out why at the moment. |
Hmm. Does sapper-ie work for you? That's what I had used to test. Maybe you're missing the polyfills if you're using the template? |
I'm observing similar behaviour in Safari 9.1. Console showing |
Was shimport transpiled with older versions of Sapper? |
Yes, can confirm. Looking at a Sapper v0.27.x app and in [email protected] all let/const symbols are transpiled to var. |
Looks like IE won't say what the syntax error is, it just highlights the entire |
You might try various versions of Sapper to figure out when it stopped being transpiled. It's super weird to me that it would change. I can't think of anything in Sapper that would affect that |
It looks like it was never transpiled, it just used to be compiled+published in a way that was compatible with IE11. https://www.npmjs.com/package/shimport/v/1.0.1 |
It's using arrow functions, that's the root cause. I don't know why shimport version 2.0.3 was written in es6 syntax but I'm fairly sure that defeats the purpose of it? I figured this out by grabbing the source for both shimports and simply sticking them in a script tag in IE11. I'm guessing we should be transpiling it at source - I'll raise a bug on the shimport project. |
My guess is that it stopped being transpiled when switching from the typescript plugin to the sucrase plugin. I bet you could switch that back and it'd get transpiled again |
Here's the issue: Rich-Harris/shimport#34 |
This should be fixed in Shimport 2.0.4. |
Describe the bug
See #1525 (comment)
To Reproduce
Load the site in IE11
Expected behavior
The javascript should run without issue.
Information about your Sapper Installation:
Internet Explorer 11
Severity
Critical - IE support is broken in Sapper and I don't believe the user is able to work around it.
The text was updated successfully, but these errors were encountered: