Developing an Angular project with locally npm-linked libraries. Watch mode auto-generates a package file (e.g., see snippet) with a dynamic version, breaking symlinks. How can auto-versioning be halted?
{"configVer": "0.1-sync+ABC"}
Developing an Angular project with locally npm-linked libraries. Watch mode auto-generates a package file (e.g., see snippet) with a dynamic version, breaking symlinks. How can auto-versioning be halted?
{"configVer": "0.1-sync+ABC"}
hey, try disabling auto-versioning in the library build config rather than relying on watch mode. i fixed my problem by tweaking the packaging scrpt in the lib itself. good luck!
I encountered a similar problem when developing Angular libraries linked locally. In my case, the dynamic version added to the package file was disrupting the symlink, breaking module resolution during development. I ended up modifying the build process in a way that avoided re-generating the version information, particularly for local development. I also experimented with creating separate build scripts for development and production, ensuring that the development script did not interfere with the symlink setup. It was a bit of trial and error, but separating these concerns ultimately made the library easier to work with locally.
hey guys, i made a workaround by hardcoding the version in our local build settings. it means updating manually for production, but it stops the symlink from breaking in watch mode. works decently for our setup.
I had a similar experience where the dynamically generated version was causing issues with the symlink in our Angular library. After some investigation, I opted to handle versioning separately for local development. I modified the build configuration to ignore the auto-version update, ensuring that the symlink remained intact during watch mode. This method required a slight restructuring of the build pipeline, but it significantly reduced friction during development. It was a bit of setup, yet the consistency it provided was well worth the extra effort.