webpack - Handsontable v0.34.0 not working with requirejs -


i using handsontable v0.34.0 , trying integrate using requirejs require config correct can see files loading fine moment, numbro , pikaday. when run call following code

require(['jquery', 'handsontable'], function ($, handsontable) {     let container = document.getelementbyid('container');     let hot = new handsontable(container, {         data: dataset,         width: 584,         height: 320,         colwidths: 47,         rowheights: 23,         rowheaders: true,         colheaders: true,         renderallrows: true     }); }); 

i error

uncaught typeerror: handsontable not constructor 

i strongly doubt has webpack code in handsontable.js

converting handsontable handsontable in code , require-config solved problem. didnt have change distributed file.

require(['jquery', 'handsontable'], function ($, handsontable) { 

to

require(['jquery', 'handsontable'], function ($, handsontable) { 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -