Import on the frontend


#1

Hello, I need import (require) this package (https://github.com/catamphetamine/read-excel-file) on the frontend.
In the documentation - I have to do like this:

//
import readXlsxFile from ‘read-excel-file’;
/
/

or I try this:

//
let readXlsxFile = require(‘read-excel-file’);
/
/

but it doesn’t work


#2

to import on the front end you’ll need a module bundler, such as webpack or rollup or browserify. here’s an example react app that i made that uses webpack as the bundler if you want a working example https://glitch.com/edit/#!/starter-react


#3

Thanks for information!