egeriis / zipcelx

Turns JSON data into `.xlsx` files in the browser
MIT License
294 stars 90 forks source link

Legacy.js(commonjs) not part of installed module #59

Closed rohitrishi closed 5 years ago

rohitrishi commented 5 years ago

Hello, Not sure if this is the best process to go about reporting/discussing this but I just npm installed this module and the folder that gets installed in node_modules does not contain the legacy.js file.

This is causing issues in our mocha testing framework. We are running our tests like so: mocha test.js --require @babel\regiter --require setupTestInfra.js

I tried the "ignore": [/node_modules\/zipcelx(?!\/module.js)/] option in the .babelrc.js file to try and get @babel\register to transpile only this module in the node_modules folder before running the tests but that did not work. The file is read as es6 when we run our tests and it results in an "Unexpected token" error for the export keyword.

If I pull down the code for this repo and run the build locally then the legacy.js file does get generated. After copy pasting that into the node_modules/zipcelx/lib folder and referencing it like so: import zipcelx from 'zipcelx/lib/legacy everything works as expected in the tests.

egeriis commented 5 years ago

Thanks for reporting! I'll take a look asap.

egeriis commented 5 years ago

It's included in v1.6.2. Thanks for reporting!