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

IE11 compatibility #374

Closed
guillaumewuip opened this issue Mar 30, 2020 · 6 comments · Fixed by #381
Closed

IE11 compatibility #374

guillaumewuip opened this issue Mar 30, 2020 · 6 comments · Fixed by #381
Milestone

Comments

@guillaumewuip
Copy link
Contributor

guillaumewuip commented Mar 30, 2020

It seems the IE11 compatibility is broken with 5.0.10-beta .

I use webpack to bundle my app and, looking at your rollup config, I think it's probably because webpack use the lib package.json module field when possible.

"module": "./dist/fuse.esm.js",

If I understand correctly your rollup config, it outputs ES6 (both ES6 modules and other ES6 features) for the esm bundle.

Fuse/scripts/configs.js

Lines 61 to 66 in aa636e6

'esm': {
entry: resolve('src/index.js'),
dest: resolve(`dist/${FILENAME}.esm.js`),
format: 'es',
env: 'development',
transpile: false,

Should not the esm bundle be ES5 with ES6 module import/export for tree shaking like explained for example here?

Something like this for the tsconfig.json

{
  "compilerOptions": {
    "module": "es6",
    "target": "es5",
...

Let me know if I can help with a PR :)

@krisk krisk added this to the v5.1.1 milestone Apr 2, 2020
@krisk
Copy link
Owner

krisk commented Apr 2, 2020

Want to create a PR for this?

@krisk krisk modified the milestones: v5.1.1, v5.2.0 Apr 2, 2020
@guillaumewuip
Copy link
Contributor Author

Yes 👍

@guillaumewuip
Copy link
Contributor Author

Looking further on the IE11 crash error, we see this
image (1)

This seems to be the babel result of this line

{ errors = 0, currentLocation = 0, expectedLocation = 0, distance = 100 }

To be IE11 compatible, we should not have object spreading here. It's looks like babel is not removing those.

@guillaumewuip
Copy link
Contributor Author

#381 should fix this

@krisk krisk closed this as completed in #381 Apr 3, 2020
@evanmoses-okta
Copy link

This should still be open until #383 is merged.

@slorber
Copy link

slorber commented Dec 4, 2020

agree, this is still a problem to me and not sure which version > 5.x I can use with a fix for IE11 / Edge 18.

Afaik the only solution is to ask webpack's babel loader to transpile this lib

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