x4js 2.2.30 → 2.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x4js",
3
- "version": "2.2.30",
3
+ "version": "2.2.31",
4
4
  "type": "module",
5
5
  "main": "src/x4.ts",
6
6
  "module": "src/x4.ts",
@@ -15,7 +15,7 @@ interface MonacoEditorProps extends ComponentProps {
15
15
  export class MonacoEditor extends Component<MonacoEditorProps> {
16
16
 
17
17
  static initCount = 0;
18
- static basePath: string = "./bin";
18
+ static basePath: string = "./monaco";
19
19
  static monaco: typeof Monaco;
20
20
  static initCbs: Function[] = [];
21
21
 
@@ -26,7 +26,7 @@ export class MonacoEditor extends Component<MonacoEditorProps> {
26
26
  return;
27
27
  }
28
28
 
29
- this.monaco = (await import( "./bin/monaco.js" )).default;
29
+ this.monaco = (await import( this.basePath+"/monaco.js" )).default;
30
30
  this.initCount++;
31
31
 
32
32
  globalThis.MonacoEnvironment = {
@@ -55,6 +55,7 @@ export class MonacoEditor extends Component<MonacoEditorProps> {
55
55
  }
56
56
  };
57
57
 
58
+ // custom append css
58
59
  const link = document.createElement('link');
59
60
  link.rel = 'stylesheet';
60
61
  link.href = MonacoEditor.basePath+'/monaco.css';
@@ -1,4 +1,18 @@
1
1
  # using monaco in x4
2
2
 
3
3
  you must copy ./bin/* in your destination folder ex. monaco folder
4
- see demo/components/monaco for a full example.
4
+
5
+
6
+
7
+
8
+ fr x4build update your package.json this this
9
+
10
+ {
11
+ ...
12
+ "x4build": {
13
+ "copy": [
14
+ { "from": "./node_modules/x4js/src/components/monaco/bin", "to": "monaco" }
15
+ ]
16
+ }
17
+ ...
18
+ }