Lightning Fast PNPM Workspaces

preview_player
Показать описание
PNPM already optimizes for speed and also comes with a built-in system for managing dependencies in a monorepo: PNPM workspaces. They work just fine, until they don't. Especially if your workspace gets bigger. In this 7 min video we're going to have a look how to add Nx to speed things up!

▬▬▬▬▬▬ Links ▬▬▬▬▬▬

▬▬▬▬▬▬ 🐦 Socials ▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

Here's a couple of useful links: Git

nxdevtools
Автор

Everything nice! But how do bundle ONLY nextapp or remixapp in a Docker image without bringing workspace folders like packages? Because I found several problems with symlinked dependencies and other components in my workspace that aren't shipped in the application I want to deploy independently.

fernaspiazu
Автор

you've got it done in 6 minutes! don't lie to us

AlexanderMazuruk
Автор

We need a solution for HMR in dev mode for all dependencies! Usually, entry files point to the dist folder of each package which makes HMR impossible.

DennisHellwig
Автор

This is a great video. I have already done this a few months ago based on some article I have read nx posted. It works fantastic. I have had some issues though configuring when I have an application that has hot/live reloading and a dependencies that is pointing to a workspace project. For example, If I have a nextjs application under `apps/example` and then I have a ui library under `libs/core-ui`. When I run `nx dev example` it will run `next dev` for that project. If I update a dependent workspace project, it will not hot reload. While I understand why I just wanted to see if it is possible to get done without have nx build the application for you. Since I want to run next dev. I have a attempt the `nx` key in my package.json and I dont want to use the project.json configuration I know you can pass and get working. I also know you can configure to use chokidar to look at dependent libraries. I just didnt know if there was a way built in to do this or it is just frowned on since you core libs/apps should be scope to themselves?

bananaisadonut
Автор

Very good tutorial, thanks for the team, I have one question, how do I build nested monorepos using NX and PNPM? I'm trying to manage a monorepo (one shared library between two monorepos)

abdelhakimmhioul
Автор

I've only ever used the integrated Nx monorepo setup before, but was wondering if there is a way to use Nx's generators with a package-based setup? Or do you have to manually create the directory, add tsup, set up the package.json etc.?

amosdottv
Автор

One "stupid" question. I'm trying to collaborate on a project that is somehow related to 2 repos that depend on each other. I want to make a monorepo, but the project is not mine and I don't want to impose my workflow to the authors, so... I'm doing a monorepo and then forking those repos, to my packages folder. In theory I still can do separate commits to each repo but I'm not sure how to implement this. I'm pretty sure I'm doing something wrong, do I have to commit the git folder? I don't commit the packages folder but add an step to autoclone those folders?. Have anybody done something like this?

SRG-Learn-Code