When I split code for Illustrator into several files and export something in one file like export default myVar and then import the file in index.jsx.ts, an error happens:
Uncaught (in promise) Error: ExtendScript ReferenceError: Object.defineProperty is not a function at utils.js:36
this happens because the following code gets injected at the start of the file where export is used:
Object.defineProperty(exports, "__esModule", {
value: true
});
And defineProperty is not present on Object.
Is there a way to fix this?
When I split code for Illustrator into several files and export something in one file like
export default myVarand then import the file in index.jsx.ts, an error happens:this happens because the following code gets injected at the start of the file where export is used:
And
definePropertyis not present onObject.Is there a way to fix this?