react-spinners: 0.5.13 Multiple default exports crashing meteor and babel minifier
Describe the bug
Error within UI after successful build:

Error thrown during babel minification process in meteor:
export default Component;
at maybeThrowMinifyErrorBySourceFile
(packages/minifyStdJS/plugin/minify-js.js:96:26)
at files.forEach.file (packages/minifyStdJS/plugin/minify-js.js:135:9)
at Array.forEach (<anonymous>)
at MeteorBabelMinifier.processFilesForBundle
(packages/minifyStdJS/plugin/minify-js.js:118:9)
While minifying app code:
packages/minifyStdJS/plugin/minify-js.js:96:26: Babili minification error
within packages/modules.js:
node_modules/react-spinners/dist/BeatLoader.js
Only one default export allowed per module.:
export default Component;
at maybeThrowMinifyErrorBySourceFile
(packages/minifyStdJS/plugin/minify-js.js:96:26)
at files.forEach.file (packages/minifyStdJS/plugin/minify-js.js:135:9)
at Array.forEach (<anonymous>)
at MeteorBabelMinifier.processFilesForBundle
(packages/minifyStdJS/plugin/minify-js.js:118:9)
To Reproduce Steps to reproduce the behavior:
- Meteor app using version 1.8.1. Babel runtime 7.3.4.
- Import react-spinner 0.5.13 into app and throws errors shown in screenshot.
Temporary Solution Our solution was to downgrade to version 0.5.12 until this is resolved.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 16 (9 by maintainers)
ok,
0.5.13is deprecated. tagged0.5.12as latest.@davidhu2000 importing like
import GridLoader from 'react-spinners/GridLoader';seems to work for methis is so weird. these are the only changes for
0.5.13https://github.com/davidhu2000/react-spinners/commit/53e943b40cff57a607e17268e986011c6cf4d93b
https://github.com/davidhu2000/react-spinners/commit/a51b9722e655e24c8e8ed7cec9828ae2edb4e88e
https://github.com/davidhu2000/react-spinners/commit/93ca51c9e57fe0a62aef64696f8fa9aa10592587
No idea how these commits are causing this issue.
Can you try to import like this and see if the issue persists?
Yes downgrading fixes the issue completely, our diff for the fix:
^0.5.4was defaulting to0.5.13when building from scratch. Locally I have switched back and forth between0.5.12and0.5.13and replicated the problem. Only0.5.13has a problem.I also get the same issue with
0.6.0-alpha.1.