Webix 6 and importing

hi Listopad,
Thanks for your reply.
I have tried this way(use ‘script-loader’)
rules: [ {
test: /webix\.js$/,
use: [ ‘script-loader’ ] }
] }
So both this way and webpack.ProvidePlugin are useful.by the way.which is better?

But my problem is how to avoid this error when run test.(react + enzyme + jest.)

@zzhang according to our further research, it seems that Jest does not fetch the sources declared at webpack.ProvidePlugin.

In order to continue using webpack.ProvidePlugin and Jest, you need to create a separate Webix provider for it.
Please create the file config/jest/webixProvider.js with the following line (with the relevant path to Webix):

window.webix = require(__dirname+"/../../src/webix/webix.js");

After that, add your webixProvider into jest.setupFiles section at package.json:

  "jest": {
    ...
    "setupFiles": [
      "react-app-polyfill/jsdom",
      "<rootDir>/config/jest/webixProvider.js"
    ],

If the will persist, please contact us via support@webix.com