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

Build does not work in IE11, .js files don't get transpiled #1990

Closed
1 task done
kouts opened this issue Oct 29, 2019 · 5 comments · Fixed by #2064
Closed
1 task done

Build does not work in IE11, .js files don't get transpiled #1990

kouts opened this issue Oct 29, 2019 · 5 comments · Fixed by #2064
Labels
has PR Has a related PR type: bug Something isn't working

Comments

@kouts
Copy link

kouts commented Oct 29, 2019

  • I confirm that this is an issue rather than a question.

Bug report

Vuepress site does not work on IE11, console throws syntax and invalid character errors.
By examining the generated .js files it seems that they don't get transpiled for IE11, e.g there are
still arrow functions present etc.

Steps to reproduce

You can reproduce it with a default Vuepress installation
and you can also view it here
Check for example files generated inside the js dir

What is expected?

Vuepress to be compatible with IE11

What is actually happening?

Vuepress is not compatible with IE11, js files don't get transpiled.

Other relevant information

  • Output of npx vuepress info in my VuePress project:
    System:
    OS: Linux 3.16 Debian GNU/Linux 8 (jessie) 8 (jessie)
    CPU: (2) x64 Intel(R) Core(TM) i7-4712MQ CPU @ 2.30GHz
    Binaries:
    Node: 9.11.2 - ~/.nvm/versions/node/v9.11.2/bin/node
    Yarn: Not Found
    npm: 5.6.0 - ~/.nvm/versions/node/v9.11.2/bin/npm
    Browsers:
    Chrome: Not Found
    Firefox: Not Found
    npmPackages:
    @vuepress/core: 1.2.0
    @vuepress/theme-default: 1.2.0
    vuepress: ^1.2.0 => 1.2.0
    npmGlobalPackages:
    vuepress: Not Found
@kefranabg
Copy link
Collaborator

kefranabg commented Nov 1, 2019

Hi @kouts

Did you check if there was already an existing issue that could solves your problem? Please check these issues that might solve your problem.

@kouts
Copy link
Author

kouts commented Nov 1, 2019

Thank you @kefranabg, I have already searched for a workaround but haven't managed to find a solution yet. In my opinion, VuePress should work OOB with IE11 without any workaround as also stated by @yyx990803 here.
If that's not the case maybe it should be added in the docs that VuePress doesn't support IE11.

@wesgro
Copy link

wesgro commented Nov 1, 2019

Ran into this as well. Seeing arrow functions not getting transpiled in the app bundle

@kouts
Copy link
Author

kouts commented Nov 2, 2019

Digging a little more into this it seems that the regex defined here doesn't match anything and this results in files not getting transpiled.
Now, replacing the regex with something like

if (filePath.includes('/node_modules/@vuepress/') && filePath.endsWith('.js')) {
  return false;
}

transpiles the files but polyfills required by IE11 seem that are not present.

@kefranabg kefranabg added the type: bug Something isn't working label Nov 6, 2019
@meteorlxy
Copy link
Member

meteorlxy commented Dec 9, 2019

#2064 can partially fix this issue.

But I found Object.assign is still not polyfilled. Those polyfills are splitted into other bundles, which are not imported by webpack correctly.

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Has a related PR type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants