CarterLi/vue3-ace-editor

A lot of files are created during project build

n-skriabin opened this issue · 5 comments

After adding this package to the project, a lot of files are created during build. (npm run build)
Screenshot_2
As you can see, each of these files is responsible for a separate topic, mode, etc. for the ace editor component.
Screenshot_3
How do I make all these files part of the assembly? In my situation, I don't need lazy loading of these modules. Thank you.

Well yes.
These files are generated by ace-builds/webpack-resolver which is necessary for dynamic mode/theme loading support. I was considering removing it, but it's a breaking change.

@CarterLi Thank you very much!!! It works! Just great! The only thing is that the "on-the-fly" validation has disappeared. To enable validation, should I also import a package?
Screenshot_4

For example, this is how it looks.
Screenshot_5

It relies on javascript-worker.

Worker support is disabled by default, you may enable it with :options="{ useWorker: true }"

To import the worker file, see: https://github.com/ajaxorg/ace-builds/blob/a4103cb0a672a4fec9a16fc344f3116b51d6bcda/webpack-resolver.js#L240

@CarterLi Thank you!!! I fixed it this way.

    import ace from 'ace-builds';
    ace.config.set(
        "basePath", 
        "https://cdn.jsdelivr.net/npm/ace-builds@" + require('ace-builds').version + "/src-noconflict/")

vue3-ace-editor.js:1160 Unable to infer path to ace from script src, use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes or with webpack use ace/webpack-resolver