-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use require.resolve logic in builds & watch .js files from node_modules #5007
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
…ssumptions of where node_modules is installed
| const requireResolveCwd = require('../require-resolve-cwd'); | ||
|
|
||
| if (!pattern) { | ||
| return null; |
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.
Would a build error be useful here or does this result in an error?
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.
It'll throw something like this:
TypeError: glob pattern string required
Now, I don't think we can ever get into this situation really because pattern is passed in from a key of a json object. I suppose I'm trying to be too cautious here.
* master: ComboBox: Fix styling when navigating menu with single select (microsoft#5017) Use require.resolve logic in builds & watch .js files from node_modules (microsoft#5007) Fix onitem click for contextual menu with anchor item (microsoft#5003) CommandBar example: fix link color on website (microsoft#4975)
…de_modules (microsoft#5007)" This reverts commit 779932c.
Pull request checklist
$ npm run changeDescription of changes
Lots of the scripts in the build tasks are doing so with a lot of assumptions on where the node_modules will end up. This change restores the use of the require.resolve logic. Several of the scripts deps have to be done by using require.resolve from scripts while others like copy & sass tasks have to use a "cwd" version.
Another issue addressed here is address
npm startalong with a dependent package. All this is needed to split up demo from components in a follow up PR.Focus areas to test
(optional)
Microsoft Reviewers: Open in CodeFlow