tc39 / proposal-dynamic-import

import() proposal for JavaScript
https://tc39.github.io/proposal-dynamic-import/
MIT License
1.87k stars 47 forks source link

dynamic-import in IE #62

Closed chiaweilee closed 6 years ago

chiaweilee commented 6 years ago

I am using dynamic-import..it worked.. But, when I build prod...something happened in IE.

I used it like this:

import(/* webpackChunkName: "lang-[request]" */ `@/lang/${lang}`).then()

after build prod:

s=function(t){n("Trjk")(`./${t}`).then()

IE can not regonize ``

How to avoid this problem?

aciccarello commented 6 years ago

@chiaweilee That seems to be an issue with your build system, not with this proposal.

demurgos commented 6 years ago

This is not an issue with this proposal but with IE. It is most likely related to your transpiler. Make sure to configure it to emit ES5 code or lower. (template strings with ` were introduced in ES6)