Unexpected token error on install


I require help with strichjs. Vaadin14 seems incapable of bundling it, Vaadin24 does not show this problem.

Using a cdn works but is unfortunately not an option for the company.

ERROR in ../node_modules/@pixelverse/strichjs-sdk/dist/strich.js?babel-target=es6 1:481651
Module parse failed: Unexpected token (1:481651)
File was processed with these loaders:
 * ../node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.

If you do not need to support IE11, you could skip babel step completely in webpack config, see: ecmascript 5 - Disable ES5 transpilation for production builds of Vaadin Flow 14.2 (or 16) apps - Stack Overflow

Unfortunately doing so seems to lead to a large amount of errors in the webpack. I’ve found that I can bypass the bundle by using ui.getPage().addJavaScript() but for some reason the server seems adamant to import the javascript as html.