Using webworker to reference the corresponding package in node_modules, the problem cannot be referenced

the development environment is based on the vue+webpack environment, and now there is a requirement to import Excel locally, then parse it into json, and save it to the database. Parse the Excel file using the xlsx plug-in.

however, considering that when the amount of Excel data is too large, the parsing process will be very long, resulting in page stuttering, so it is decided to hand over the parsing process to webworker . However, there is a problem that import cannot be used in webworker , and the sentence import XLSX from "xlsx" is not valid.
uses var XLSX = importScripts ("/ node_modules/xlsx/xlsx.js") , but the return value is undefined .

I checked for a long time, but I didn"t find it. I wonder if any of the great gods have solved similar problems.

Apr.18,2022

to use packages in the node environment in browsers, configure the packaged build environment, such as rollup, webpack, browserify, and so on.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c3a197-3c566.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c3a197-3c566.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?