Subscribe on changes!

Missing Vue License

avatar
Jan 9th 2024

Vue version

Any

Link to minimal reproduction

/

Steps to reproduce

Checkout CDN code: https://unpkg.com/vue@3.4.7/dist/vue.global.js.

What is expected?

There should be information about the license of the code in js file, imo.

What is actually happening?

There's no license information in the CDN code nor in the bundle which is generated by vite for example. Unless I'm completely mistaken it should be included like the license says

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

Pinia for example has at least this https://github.com/vuejs/pinia/blob/v2/rollup.config.mjs#L44 which results in the following to appear after building

/*!
 * pinia v2.1.7
 * (c) 2023 Eduardo San Martin Morote
 * @license MIT
 */

System Info

/

Any additional comments?

sorry if this isnt perhaps the right replace to mention this.

avatar
Jan 9th 2024

The license inclusion requirement only applies to users using the software, not the copyright owner distributing it. Technically the license is already distributed as part of the npm package (e.g. https://unpkg.com/browse/vue@3.4.7/LICENSE), but I guess we can include a small banner in individual files as well.

avatar
Jan 9th 2024

Yes, but users who use vue, will end up without a license in their js code . The end customer who visits the users webpage doesnt know about npm and certainly cant tell from the minified code that it's vue (or any other package). So right now essentially every vue user is missing license information about vue in their js files and according to this https://greendrake.info/publications/js-gpl#does-using-javascript-code-on-a-website-constitute-distribution-of-the-code-to-the-website-visitors it technically counts as distributing code (in case it's client side and not CDN). I think the entire situation is bit more dire since very few packages actually include such a banner, so important copyright information is missing from a lot of websites.

avatar
Jan 9th 2024

Even if we include the banner in dist files, bundlers are not guaranteed to preserve them. This is not something we can enforce so like you said, this is probably not the place to discuss that.

avatar
Jan 9th 2024

Even worse in the bundlers case I'd say. From what I can tell vite/rollup at least preserves any comments starting with @license, like the pinia banner.