Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React: "legalComments": "linked" error #2385

Closed
gkiely opened this issue Jul 13, 2022 · 3 comments
Closed

React: "legalComments": "linked" error #2385

gkiely opened this issue Jul 13, 2022 · 3 comments

Comments

@gkiely
Copy link

gkiely commented Jul 13, 2022

When building an application that contains React using "legalComments": "linked" I get the following error.
"Cannot transform with linked or external legal comments".

As far as I can tell there are no linked/external legal comments. Is this something that can be fixed or is it intended and I am reading this incorrectly?

Example repo:
https://github.com/gkiely/vite-react-starter

Steps:

> Uncomment esbuild section in vite.config.ts, line 65-67
npm i
npm run build
@gkiely gkiely changed the title React: "legalComments: linked" error React: "legalComments": "linked" error Jul 13, 2022
@evanw
Copy link
Owner

evanw commented Jul 13, 2022

This is an error because you are not supposed to do this. Passing linked tells esbuild to generate an additional .LEGAL.txt output file, but transform mode (unlike build mode) returns a string and doesn't support returning additional generated files. So linked is incompatible with transform mode.

@gkiely
Copy link
Author

gkiely commented Jul 13, 2022

Understood, I take it this won't be supported and will close the issue.

@gkiely gkiely closed this as completed Jul 13, 2022
@danielo515
Copy link

Why? Why can not the legal comments be processed and generated in a separate pipeline while the transform gets the code with the comments removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants