Skip to content

Banner on top of generated webpack output #638

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
ehtb opened this issue Sep 13, 2016 · 3 comments
Closed

Banner on top of generated webpack output #638

ehtb opened this issue Sep 13, 2016 · 3 comments

Comments

@ehtb
Copy link

ehtb commented Sep 13, 2016

I was thinking about adding support to Webpack's Bannerplugin?

Something along the lines of:

var pkg = require('./package.json');

/**
 ** <%= pkg.name %> - <%= pkg.description %>
 ** @author <%= pkg.author %>
 ** @version v<%= pkg.version %>
 **/

Perhaps we could also add support for licenses:
fs.readFileSync('./LICENSE', 'utf8')

I can make a pull request if you're interested.

@gaearon
Copy link
Contributor

gaearon commented Sep 13, 2016

Can you describe the use case for this when building apps?

@ehtb
Copy link
Author

ehtb commented Sep 13, 2016

We are using this to quickly be able to see which version of the built js we are running, by simply reading the header / banner of the file. Another one might be to show license or author information.

@gaearon
Copy link
Contributor

gaearon commented Sep 16, 2016

I see. I think this is a very specific request and probably out of scope for CRA. You can do this manually by post-processing build output if you’d like.

@gaearon gaearon closed this as completed Sep 16, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants