Open therealgilles opened 3 years ago
Any updates on this issue?
I found a solution. Webpacke needs to use babel in order to transpile a version of javascript the minify can work with.
See the babel manual: https://babeljs.io/docs/en/babel-plugin-proposal-async-generator-functions
Babel configuration file .babelrc should contain those transpile options that you require.
{ "plugins": ["@babel/plugin-proposal-async-generator-functions"] }
However, it would be nice to know the ES/JS versions that are supported by minfy.
This error is causing chaos with cache plugins. Testet with WP Rocket & LiteSpeed. Have rolled back the Elementor versions on large sites.
The following library gets incorrectly minified:
https://swinginatthesavoy.com/wp-content/plugins/elementor-pro/assets/js/webpack-pro.runtime.js
The minification does not insert a semi-colon or comma before
(()=>{ ... })()
statement, which results in the syntax error as:gets interpreted differently than:
due to javascript auto semi-colon insertion on newline.