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

@license comments are not preserved during build #4596

Closed
heymartinadams opened this issue Jun 11, 2018 · 8 comments
Closed

@license comments are not preserved during build #4596

heymartinadams opened this issue Jun 11, 2018 · 8 comments

Comments

@heymartinadams
Copy link

heymartinadams commented Jun 11, 2018

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes. Yarn version: 1.6.0

Which terms did you search for in User Guide?

I was asked to file a bug report in issue #4116.

Environment

npx: installed 67 in 14.97s

Environment:
  OS:  macOS High Sierra 10.13.3
  Node:  9.7.1
  Yarn:  1.6.0
  npm:  6.0.0
  Watchman:  Not Found
  Xcode:  Xcode 9.3 Build version 9E145
  Android Studio:  Not Found

Packages: (wanted => installed)
  react: ^16.0.0 => 16.4.0
  react-dom: ^16.0.0 => 16.4.0
  react-scripts: ^1.1.4 => 1.1.4

Steps to Reproduce

  1. ./src/index.js contains the following comment:
/**
  * @license Copyright (c) Conscious Apps Inc. All Rights Reserved.
  * Written by Martin Adams https://github.com/heymartinadams
*/
  1. Run react-scripts build.

Expected Behavior

On running react-scripts build, however, comment isn’t preserved in resulting ./build/static/js/main.*.js file, even though (as issue #4116 states), create-react-app ought to preserve JSDoc-style comments.

Actual Behavior

Missing @license comment in ./build/static/js/main.*.js file.

@heymartinadams
Copy link
Author

Note: wherever the uglifyjs compiler is run, it needs the --comments option to preserve @license and @preserve comments: https://github.com/mishoo/UglifyJS2#command-line-options

@jan25
Copy link

jan25 commented Jun 12, 2018

@heymartinadams Hi, does this PR fix this bug?

@heymartinadams
Copy link
Author

heymartinadams commented Jun 14, 2018

Sorry for my ignorance, @jan25, how can I test this PR?

@jan25
Copy link

jan25 commented Jun 14, 2018

@heymartinadams maybe this can help modify/test non-merged PR

@heymartinadams
Copy link
Author

Mmh... I still didn’t get it (in some areas, like git, I’m a complete beginner). How about this? It’s not a high-priority issue for me, and I trust you all, so if you say you fixed it, pretty sure it works? (Sorry, don’t mean to be difficult, just super focused on a project and can’t spend too much time on other things at the moment.)

@Timer Timer modified the milestones: 2.0.x, 2.x Sep 26, 2018
@Timer Timer removed this from the 2.x milestone Nov 2, 2018
@stale
Copy link

stale bot commented Dec 2, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 2, 2018
@iansu iansu removed the stale label Dec 3, 2018
@stale
Copy link

stale bot commented Jan 2, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 2, 2019
@stale
Copy link

stale bot commented Jan 13, 2019

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Jan 13, 2019
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants