From f811992527e15aa310fcef1603a69776adff6a7c Mon Sep 17 00:00:00 2001 From: Arpad Gabor Date: Sat, 23 Oct 2021 19:06:02 +0300 Subject: [PATCH] fix: monaco build problems --- packages/editor-ui/src/components/CodeEdit.vue | 11 +++++------ packages/editor-ui/vue.config.js | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/editor-ui/src/components/CodeEdit.vue b/packages/editor-ui/src/components/CodeEdit.vue index 3a32ed7862..b5bfd9a94e 100644 --- a/packages/editor-ui/src/components/CodeEdit.vue +++ b/packages/editor-ui/src/components/CodeEdit.vue @@ -57,12 +57,11 @@ export default mixins(genericHelpers).extend({ readOnly: this.isReadOnly, }); - this.monacoInstance.onDidChangeModelContent((ev) => { - if (this.monacoInstance) { - const model = this.monacoInstance.getModel(); - if (model) { - this.$emit('valueChanged', model.getValue()); - } + this.monacoInstance.onDidChangeModelContent(() => { + const model = this.monacoInstance!.getModel(); + + if (model) { + this.$emit('valueChanged', model.getValue()); } }); diff --git a/packages/editor-ui/vue.config.js b/packages/editor-ui/vue.config.js index ef36eb00bc..6f2e10804c 100644 --- a/packages/editor-ui/vue.config.js +++ b/packages/editor-ui/vue.config.js @@ -16,7 +16,7 @@ module.exports = { disableHostCheck: true, }, plugins: [ - new MonacoWebpackPlugin(), + new MonacoWebpackPlugin({ languages: ['javascript', 'html', 'typescript'] }), ], }, css: { @@ -28,5 +28,5 @@ module.exports = { }, }, }, - publicPath: process.env.VUE_APP_PUBLIC_PATH ? process.env.VUE_APP_PUBLIC_PATH : '/', + publicPath: process.env.VUE_APP_PUBLIC_PATH && process.env.VUE_APP_PUBLIC_PATH !== '/%BASE_PATH%/' ? process.env.VUE_APP_PUBLIC_PATH : '/', };