-
Notifications
You must be signed in to change notification settings - Fork 48.3k
Use Entry in yarn build ...
Instead of Label
#14148
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
This ensures that `yarn build core dom` includes DOM. It also ensures that spaces like `yarn build "core, dom"` doesn't build EVERYTHING.
Instead we just use the name from entry using fuzzy search. There is one special case. If you put in `/index` or `/index.js`. That allows to build things like `react/index` to only build isomorphic where as `react` would build everything. Or `react-dom/index` to exclude the server renderers.
Details of bundled changes.Comparing: 3ff2c7c...9e790ae scheduler
Generated by 🚫 dangerJS |
That way things like `yarn build react/` works too.
4e7e715
to
9e790ae
Compare
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.
Seems like ideally react
would match only react
but react-dom/server
would match react-dom/server.node
and react-dom/server.browser
. What if foo
means we match the name "foo" exactly as well as names starting with "foo." and "foo/"?
Can we also have it error and spit out all the bundle names if you don't pass valid input?
it's useful to do partial matches to some degree still. E.g. |
* Parse build script type and package names This ensures that `yarn build core dom` includes DOM. It also ensures that spaces like `yarn build "core, dom"` doesn't build EVERYTHING. * Get rid of label in bundles config Instead we just use the name from entry using fuzzy search. There is one special case. If you put in `/index` or `/index.js`. That allows to build things like `react/index` to only build isomorphic where as `react` would build everything. Or `react-dom/index` to exclude the server renderers. * Instead of matching `/index.js` just append it to the search string That way things like `yarn build react/` works too.
* Parse build script type and package names This ensures that `yarn build core dom` includes DOM. It also ensures that spaces like `yarn build "core, dom"` doesn't build EVERYTHING. * Get rid of label in bundles config Instead we just use the name from entry using fuzzy search. There is one special case. If you put in `/index` or `/index.js`. That allows to build things like `react/index` to only build isomorphic where as `react` would build everything. Or `react-dom/index` to exclude the server renderers. * Instead of matching `/index.js` just append it to the search string That way things like `yarn build react/` works too.
yarn build core,dom
->yarn build react/index react-dom
or
yarn build core,dom-client
->yarn build react/,dom/index
I've been frustrated that I can never guess what arguments
yarn build
expects so always end up building everything.First, I improved the argument parsing a bit so that you don't have to separate the bundle names by commas. But commas still work. This ensures that
yarn build core dom
includes DOM.It also ensures that spaces like
yarn build core, dom
doesn't build EVERYTHING by becoming an empty entry which matches everything.I also got rid of label in bundles config. These follow a fairly arbitrary naming convention so I can never guess.
Instead I just use the name from npm entry name using fuzzy search.
There are some cases where this is weird. E.g.
yarn build react
builds everything since everything is called something withreact
in it.There is one special case. The entry gets appended with
/index.js
at the end.That allows to build things like
yarn build react/
to only build isomorphic. Oryarn build react-dom/index
to exclude the server renderers where asyarn build react-dom
includes server renderers.