JXA-userland / JXA

JavaScript for Automation(JXA) packages for TypeScript/Node.js.
MIT License
417 stars 21 forks source link

Array.includes doesn't work anymore #54

Closed castroCrea closed 1 year ago

castroCrea commented 1 year ago

Hello, I just upgrade from 1.3.4 to 1.3.6 and find out that everything crashed because JXA is not able to read [].includes.

I couldn't find any mention in the changelogs.

Do I miss something?

I got the error

"Can't find variable: _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9___default"
castroCrea commented 1 year ago

Solution

Ok stupid mistake, I remove the babel.config.js

module.exports = {
  presets: [
    ['@babel/preset-env', { targets: { node: 'current' } }],
    '@babel/preset-typescript',
  ],
};