Add license headers in js/dist files#27308
Conversation
|
Thanks for the PR @helmutgranda! @Johann-S do you think we could have the license header in a common place and use it in both scripts? |
FYI, I thought of doing so but I didn't know if the PR/Review process would be more drastic but for sure that is a more elegant approach. |
Johann-S
left a comment
There was a problem hiding this comment.
With the banner in a different file, I'll be good 👍
Thanks @helmutgranda 👍
Johann-S
left a comment
There was a problem hiding this comment.
With that changes it'll be good 👍
|
I'm gonna test it tomorrow but I quickly made the changes. |
ee29a76 to
5185edb
Compare
|
Works fine, thanks @helmutgranda! @Johann-S: maybe we should add the component's name like we did in v3? |
|
Yep I think it'll work 👍 |
By implementing the same approach of rollup.config.js and replicate it in build-plugins.js, individual plugins will display license headers.
5185edb to
dd9cdc1
Compare
| const rollup = require('rollup') | ||
| const path = require('path') | ||
| const babel = require('rollup-plugin-babel') | ||
| const banner = require(path.resolve(__dirname, './banner.js')) |
There was a problem hiding this comment.
Not a big fan of using path.resolve here because require('./banner.js') will works fine 🤔
By implementing the same approach of rollup.config.js it can be replicated in build-plugins.js, with this approach individual plugins display license headers as expected.
Fixes #27301