react-helmet-async
react-helmet-async copied to clipboard
`/*#__PURE__*/` annotations don't play well with Vite / Rollup
It looks like the build script for this lib is outputting code which contains /*#__PURE__*/
annotation comments. Unfortunately they look like they're misplaced, and we're getting some non-blocking warnings about it. Here's what the warnings look like when compiling an app which uses this lib, with Vite:
"/*#__PURE__*/"
in "../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-helmet-async/lib/index.module.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-helmet-async/lib/index.module.js (1:13561) A comment
"/*#__PURE__*/"
in "../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/react-helmet-async/lib/index.module.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
It's time to look for alternative libs. Any suggestions? :)
The warning disappears from version 2.0.0. Because the lib switched to use esbuild. You can give it a try.
Here's the diff: https://github.com/staylor/react-helmet-async/compare/b1ee65880e71df9124c4e01d07c086d8ce2fc63a...a75c3ae812af1608a5f4c65b8c93c29e6896018b
@thienandangthanh thank you for the response. If true, this issue should be closed.