bazel-next-typescript-monorepo
bazel-next-typescript-monorepo copied to clipboard
Mono repo example with nextJS, Typescript and Bazel
NextJS Bazel Monorepo Example
This is an example of frontend monorepo with several packages:
-
common: Shared elements for any application (JS)
-
common2: Shared elements for any application (TS)
-
webapp2: An example universal (SSR) client app build in nextJS that depends on
common -
webapp2: An example universal (SSR) client app build in nextJS + Typescript that depends on
common2 -
NextJS Bazel Monorepo Example
- Prerequisites
- Available Commands
- Install
- Run webapp (JS) (nexJS + common)
- Run webapp2 (TS) (nexJS + common2)
- Build webapp docker image
- Run webapp docker image
Prerequisites
Available Commands
Install
Installs all dependencies for every package
yarn
Run webapp (JS) (nexJS + common)
Installs all dependencies for every package
yarn start:webapp
// or:
bazelisk run //packages/webapp:start
Run webapp2 (TS) (nexJS + common2)
Installs all dependencies for every package
yarn start:webapp2
// or:
bazelisk run //packages/webapp2:start
Build webapp docker image
bazelisk run //packages/webapp:image --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
Run webapp docker image
docker run -it -p 3000:3000 bazel/packages/webapp:image