Issues with laravel-mix/webpack not including handsontable

Tags: #<Tag:0x00007f8b1d91ce40>

Going crazy here. Maybe I’ve been staring at this for too long :slight_smile:

So, pretty straightforward setup. I did the requisite npm install handsontable, per the docs. I added this to the bottom of my resources/js/bootstrap.js file (with all my other node module imports):

import { Handsontable } from 'handsontable';

Sadly, when I npm run dev (or prod), it doesn’t include it in the bundled js. No errors are thrown, though, so I’ve no idea. Any thoughts?

Hi @scott

We do not have much experience with Laravel. Can you list the dependencies of your project? We have been notified that the current version does not work with Vue 3.

Hi, and thanks for the reply! I’m not currently using Vue at all. This is an older (traditional) app which uses jQuery.

Running:

laravel-mix@6.0.13
webpack@5.27.0

Here is what we have as far as dependencies go (from the app’s package.json):

"@popperjs/core": "^2.9.1",
"amcharts3": "^3.21.15",
"angular": "^1.8.2",
"angular-ui-bootstrap": "^2.5.6",
"axios": "^0.21",
"bootstrap": "^5.0.0-beta3",
"chalk": "^4.1.0",
"datatables.net": "^1.10.24",
"datatables.net-bs": "^1.10.24",
"datatables.net-dt": "^1.10.24",
"datatables.net-responsive": "^2.2.7",
"datatables.net-responsive-bs": "^2.2.7",
"dts-critic": "^3.3.4",
"dtslint": "^4.0.7",
"eonasdan-bootstrap-datetimepicker": "^4.17.49",
"fullcalendar": "^5.5.1",
"handsontable": "^8.3.2",
"jquery": "^3.6.0",
"jquery-mask-plugin": "^1.14.16",
"jquery-ui": "^1.12.1",
"jquery-validation": "^1.19.3",
"lang.js": "^1.1.14",
"laravel-echo": "^1.10.0",
"laravel-mix": "^6.0.13",
"laravel-mix-ignore": "^1.0.1",
"lodash": "^4.17.19",
"moment": "^2.29.1",
"postcss": "^8.1.14",
"pusher-js": "^7.0.3",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.8",
"sass-loader": "^10.1.1",
"select2": "^4.1.0-rc.0",
"select2-bootstrap-5-theme": "^1.1.1",
"summernote": "^0.8.18",
"sweetalert": "^2.1.2",
"tinycolor2": "^1.4.2",
"toastr": "^2.1.4",
"tslint": "^6.1.3",
"tsutils": "^3.21.0",
"typescript": "^4.2.3"

Does it build correctly if you remove select2? Their library doesn’t update as frequently as ours and it does not work with the newest version of Handsontable.

MomentJS also can be an issue. Handsontable uses it as a dependency in v 2.24.0

I’m closing this issue as there is no feedback for nearly a month.
If you still need any guidance, please create a new ticket or message me at support@handsontable.com