-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
feat(build): emit license #18546
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
feat(build): emit license #18546
Conversation
|
I wonder if we should add a comment that includes link to the license file. TerserWebpackPlugin adds them. The API and the implementation looks good to me. I even think that the current information is sufficient. I think this feature should focus on license compliance and I believe all the necessary information is included in the license file. (Sorry that it took almost an year 🙏) |
|
Better late than never 😄
Do you mean for the inline legal comments, we rewrite it as a link to the output file we generate? It's a bit tricky to do that I think as the output file may not be the final file if it was postprocessed. Or perhaps it's hosted in a different place. Maybe it's something we can support later though as it requires a new option, and on the topic of more options, maybe it's more scalable if the types are |
packages/vite/src/node/__tests__/plugins/fixtures/license/dep-license-mit/index.js
Outdated
Show resolved
Hide resolved
I guess yes, I was thinking of adding a comment like |
Description
closes #17892
supersedes and closes #18104
Very crude implementation for license support. It supports outputting to
.vite/license.mdby default, however you can set a path with.jsonto output in.jsonformat for further processing.It doesn't contain all dependency
package.jsoninformation or all features of https://github.com/mjeanroy/rollup-plugin-license. I don't think we should implement all of it, but we could expose more information to be sufficiently flexible for extending or customizing the output. It also does not contain licenses for the project itself.Open to discussion of how the API and output should look like. You can check out the snapshot tests for example of the current output.