Closed andyford closed 5 months ago
Sounds like the problem is related to /*#__PURE__*/React.createElement
, not /*#__PURE__*/createElement
as it expected using modern transpilers/React 18
The problem is actually the comment // nearest focus guard
:
https://github.com/theKashey/react-focus-lock/blob/1566a55fcb058686344b335f89a26e4ac1846fe0/src/Lock.js#L141-L142
When Babel runs, it retains the comment and adds the /*#__PURE__*/
on the line above the comment, triggering Rollup. See https://github.com/theKashey/react-focus-lock/pull/275 for a solution.
Fixed in v2.9.7
My team recently switched from Rollup 2.x to 4.x and now get the following warning when running rollup with the "watch" flag (
rollup -c -w
)I found a couple other threads discussing a similar issue and they seem to agree with the warning message that the
/*#__PURE__*/
comment is misplaced in the source code https://github.com/swc-project/swc/issues/8199 https://github.com/intlify/vue-i18n-next/issues/1599