Problem with Angular website on Edge only: SCRIPT5022 expected identifier string or number

﹥>﹥吖頭↗ 提交于 2021-01-04 07:33:25

问题


We just launched our website but I'm facing a problem on Edge. I can't figure out where the error is coming from, I made sure there is no rest syntax in any script.

This is our website: https://bubblydoo.be/nl

If you have other feedback regarding the website, you can definitely let me know!


回答1:


The problem was that some modules, including picomatch, were not transpiled to ES5, and webpack doesn't transpile any node_modules, it just takes them as is. Picomatch was included by an internal library that was bundled by Rollup, so I used babel (rollup-plugin-babel) to transpile it:

babel({
  exclude: /node_modules\/(?!picomatch)/,
})


来源:https://stackoverflow.com/questions/58502621/problem-with-angular-website-on-edge-only-script5022-expected-identifier-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!