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

Viewed 932

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 Answers

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)/,
})
Related