-
Notifications
You must be signed in to change notification settings - Fork 4
Editor worker is loaded twice #10
Comments
Monaco editor wants the css worker for "scss" and "less" files as well |
No error seems to appear anymore. Still, when there are eg. two JavaScript editors on the same page, the |
I have the same issue. Manaco editor load multiple times, if another one not yet downloaded (it's possibly only via network, not locally). |
Did you try with latest version 0.17.2 (where I added some logic for editors to wait until the libraries are downloaded)? Could you post the xhtml you're using? |
NPM has not 0.17.2 version |
This is a maven project, you don't download it from npm: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
...
<dependencies>
<dependency>
<groupId>com.github.blutorange</groupId>
<artifactId>primefaces.monaco</artifactId>
<version>0.17.2</version>
</dependency>
</dependencies>
</project>
|
When the language mode is one without a special worker (eg. SCSS), the
editor.worker.js
is loaded twice.This is because monaco editor calls the worker factory (a) for the language-specific worker and (b) for the general editor worker. The
getScriptName
function is implemented as:Also, when loading multiple instances of the monaco editor, it needs to checked as well whether that may result in workers being loaded multiple times
The text was updated successfully, but these errors were encountered: