Installation Problems with Vue

Hi,

I’m tring to install the spreadsheet in my Vue3JS project. I’ve copied the “dhxSpreadsheet” folder into src/assets, with both js and css files.

In the Vue component I’ve copied the code:

import * as dhx from "@/assets/dhxSpreadsheet/spreadsheet";
import "@/assets/dhxSpreadsheet/spreadsheet.css";

export default {
  mounted: function() {
    console.log(dhx)
    this.spreadsheet = new dhx.Spreadsheet(this.$refs.container);
  }
};

But on console I get this error:

Uncaught (in promise) TypeError: dhx.Spreadsheet is not a constructor

Do you have any advice?

Thanks.

Here’s the console.log(dhx):

Symbol(Symbol.toStringTag): “Module”

That’s different from the same console.log in the example gitHub project:

Object { message: Getter, i18n: {…}, css: Getter, Spreadsheet: Getter, … }
Spreadsheet: function t(t, n)__esModule: true
css: Object { _classes: {…}, _styleCont: style#dhx_generated_styles}
i18n: Object { setLocale: setLocale(e, n), spreadsheet: {…} }
message: function message(e)

Could you please, provide a complete demo of your app, where the problem can be reconstructed locally?