Repository navigation
Conversation
|
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
| ], | ||
| entry_point = "internal/e2e/rollup/foo.js", | ||
| srcs = ["bar.js"], | ||
| entry_point = ":foo.js", |
There was a problem hiding this comment.
interesting that you don't have to specify foo.js in the srcs. It seems like it reduces one way users can fall off the happy path. on the other hand it means you have to consider entry_point when enumerating the inputs to a rule.
Should we give it more thought?
There was a problem hiding this comment.
Hmmm. That's a good question. One strike against doing it this way is that if the user specifies :foo.ts as the entry_point they still have to add the ts_library :foo_lib to deps. I'm not sure what is best. On the other hand, the user adding :foo.js to entry_point and to srcs doesn't break anything with the current approach.
There was a problem hiding this comment.
There is some smell however with not having the file in srcs as seen here: https://github.com/bazelbuild/rules_nodejs/pull/777/files#diff-6e8a939ed5da5eca956cd2f53701b77e. Probably better to force it to be specified
…le entry_point change (#480) Also updates parcel example entry_point to label
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
Replaces #480
Closes #32
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
nodejs_binary#entry_point was a string.
What is the new behavior?
nodejs_binary#entry_point is now a Label.
Does this PR introduce a breaking change?
The
entry_pointaccepts a target's name as an entry point. If the target is a rule, it should produce the JavaScript entry file that will be passed to the nodejs_binary rule). For example:If the entry JavaScript file belongs to the same package (as the BUILD file), you can simply reference it by its relative name to the package directory: