[英]Rollup with absolute Typescript imports
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.
). Rollup 很好地捆绑了它,但它会针对错误的源映射抛出一些警告(
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).问题的根源似乎是
@babel/preset-react
development: true
(将其设置为false
会使警告消失)。 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.还有一个关于
'this' has been rewritten to 'undefined'
的警告,似乎相关,因为它在关闭该选项时消失。
At the end, I decided to disable development: true
and set it to false
.最后,我决定禁用
development: true
并将其设置为false
。 Definitely it should not be true when building libraries.在构建库时绝对不应该是这样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.