react-ace
react-ace copied to clipboard
Auto-complete is not working when used on electron
Problem
When using the editor on an electron app, the auto-complete feature(both basic & live) is not working. And at the same time found the following error on the console and am guessing it is related:
Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'file:///Users/user/path/to/app/worker-css.js' failed to load.
Apparently it is trying to import the file from the wrong path.
Is there a way to override the worker module path?
I'm not sure if you're using the Worker, but if you don't, just add this to the options that the error will go away:
<AceEditor
setOptions={{
useWorker: false,
}}
/>