Skip to content

Lots of Copyright comment blocks in main.js build #2386

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

Closed
intellix opened this issue Sep 28, 2016 · 8 comments
Closed

Lots of Copyright comment blocks in main.js build #2386

intellix opened this issue Sep 28, 2016 · 8 comments
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@intellix
Copy link
Contributor

Version: beta.16
OS: OSX 10.12

So I just ran an ng build -prod --aot using beta.16 and was looking at the output. I noticed main.js has about 20 - 30 instances of Google Copyright notice (one above each block). The same happens for a build without AoT as well actually.

/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

I'm guessing there should only really be one or none of those at the top of the generated dist/main.js

Screenshot: https://www.dropbox.com/s/4cuf1yxtik9drjy/Screenshot%202016-09-28%2010.50.09.png?dl=0

@filipesilva
Copy link
Contributor

filipesilva commented Sep 28, 2016

@hansl can you have a look? This must be part of the total bundle size.

@filipesilva filipesilva added type: bug/fix command: build P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Sep 28, 2016
@hansl
Copy link
Contributor

hansl commented Sep 28, 2016

I need to talk to the legal team about this. The google ones are probably okay to only put one, but third party libraries might be more complicated.

@bonnici
Copy link

bonnici commented Sep 28, 2016

Just FYI I made a new beta16 project and ran the main bundle through a comment stripper, and non-gzipped size went from 815kb to 764kb.

@grizzm0
Copy link
Contributor

grizzm0 commented Sep 29, 2016

Speaking of comments.

I'm using material-design-lite and building it from scss. My styles.bundle.js with --prod contains 31 occurrences of every single /* */ comment (not // comments) in _variables.scss as it's included 31 times.

Perhaps I should create a separate issue for this tho?

@grizzm0
Copy link
Contributor

grizzm0 commented Oct 17, 2016

CSS comments has been solved in #2593.

@un33k
Copy link

un33k commented Oct 17, 2016

I see the comments with builds using ngCLI beta.17 as well. Can we strip the credits into a credits.txt file that refers to the compiled .js/.css? MIT doesn't require the presence of the copyright notice in binary distributions. Can a *.js file be considered a binary distribution?

@intellix
Copy link
Contributor Author

Tracked by: #4413
Addressed by: #4694

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

No branches or pull requests

6 participants