25 years in IT as dev and team leader
•
1 review•
While it is a nice take at the chaotic javascript toolchain, its default settings for the most basic typescript project are messy and don't work.
I've spent hours trying to have pretty basic things; for example, since sourcemaps are on, please include the sources... and don't transpile into a "src" folder otherwise when I add sources imports will get messy and try to import the ts file .. and why are you transpiling everything in an external "dist" folder? that makes all the sourcemap references wrong ("../../../../packages/etc/etc/file.ts") and nothing works.
Nx wraps and hides a lot of details, but the wrapping is often hiding and blocking useful things; I added to my jest configuration two totally valid configuration settings (namely, maxWorkers and testSequencer), and it works if I just do "cd package/name; npx jest", however the Nx wrapper for jest is not recognizing them, so it does not apply them, so tests do not work.
In all of this, each package contains EIGHT files in the root directory, the common package.json and README.md (yeah could delete this one), then three tsconfig json files, one jest configuration, an .eslint.json .. and since these were not enough Nx adds its own project.json file. These files are generated, so they repeat the same stuff over and over in each folder .. so that when something needs to be changed it will need to be changed in all the places.
The project.json file was specifically boringly long (47 lines by default), all the same but changing only the paths (couldn't it just cwd and use relative paths?) .. then after days of using it I found a page that explained that most of the project.json content could be set in nx.json on the root folder, and that allowed me to delete over 500 lines of useless repetitions .. so why isn't the automatic scaffolding thing doing that already? why did I have to find it out and then do it manually?
I was expecting much much much more given the hype this project has all over the place .. I ended up modifying and cleaning up all the generated files, so I can't use the generation part anymore, I can't run tests thru it on many of my packages, so it is not much more than a for-cycle executing npm run in each folder.
Maybe there are different use cases in which it is excellent, maybe coming from years of Java using Maven I'm just too used to setup a project with tens of modules in a couple of hours .. I'm just trying to have a monorepo with a library of 10 packages in it.