Rollup bundles it fine, but it throws some warnings for wrong source maps (Error when using sourcemap for reporting an error: Can't resolve original location of error.
). The root of the problem seems to be @babel/preset-react
development: true
(setting it false
makes the warning disappear). Am I doing something wrong, or this is expected behavior? The generated code seems fine to me...
There is also a warning about 'this' has been rewritten to 'undefined'
, seems related because it disappears when switching off that option.
At the end, I decided to disable development: true
and set it to false
. Definitely it should not be true when building libraries.