-
Notifications
You must be signed in to change notification settings - Fork 2.2k
add logic to prefer prebid modules over external modules in build process #4124
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
Conversation
The only thing I'm worried about is that one of the initial requirements when I was implementing the module system was to allow modules to be pulled in from I think we might need a system that, instead of ignoring |
@snapwich Thanks for the feedback; I have an idea to implement that type of logic. I'll push in the changes in a little bit. |
Node require with paths requires v8.9.0+ I think? (that's what the docs say, but I could swear I had issue with anything less than 10) Is that okay? |
we are due for an upgrade on node anyway.
is what package.json has. So we should update that as part of this change. |
I updated the node version references to 8.9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -21,7 +21,7 @@ | |||
"author": "the prebid.js contributors", | |||
"license": "Apache-2.0", | |||
"engines": { | |||
"node": ">=4.0" | |||
"node": ">=8.9.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could update https://github.com/prebid/Prebid.js/blob/master/.nvmrc as well to reflect this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type of change
Description of change
Fixes #4120
This PR fixes the build problem with the Prebid.js
express
module reported in the above issue.The issue only occurred when you specifically included
express
with themodules
parameter in a build command (eggulp build --modules=express
) and because the module shared a name with one of the project's nested dependencies.Basically this line here recognized the
express
module in thenode_modules
folder and included that path when the overall function was compiling the list of module paths to include for the build. When this path was added to the build process, it had issues trying to find its dependent packages since they were installed in the wrong locations (if we were actually using the packageexpress
directly in the project).By adding a check to only include modules that belong to our project, it avoids adding that other file path and allows the build to proceed as normal.