-
-
Notifications
You must be signed in to change notification settings - Fork 121
feat: add contrib/nextjs rules for building and running nextjs applications #2150
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
|
0f1eb19
to
bd43409
Compare
c4a6105
to
41f6157
Compare
41f6157
to
4d140cc
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.
Looks good! ✅
4d140cc
to
bc81760
Compare
@Izzy-CodersPlanet want to try it out? Have any feedback? |
7fee939
to
99029a4
Compare
99029a4
to
31f508d
Compare
FYI @domenic-donato |
31f508d
to
437c803
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.
Nice!
Awesome, thank you! 🚀 |
Ref #1292
Close #1126
Changes are visible to end-users: yes
Provide
@aspect_rules_js//contrib/nextjs:defs.bzl
for convenience macros for NextJs applications built usingnext
.Primary API:
next()
wrapper of the 3 primarybuild
,start
anddev
macros - aligning with package.json bin entries created bycreate-next-app
nextjs_build()
- the npmnext build
nextjs_start()
- the npmnext start
(where thebuild
is a dependency)nextjs_dev()
- the npmnext dev
Standalone server API, where custom pnpm+bazel logic is required:
nextjs_standalone_build()
is the standardnext build
but with some workarounds oroutput: standalone
nextjs_standalone_server()
follows the standalone mode instructions for rearranging the directory structure, then defines ajs_binary
to run theserver.js
within that directoryTest plan