Build discrepancies when installing npm module from source

I have a JS library that currently has the distribution folder on source control and I want to avoid using that solution. Some users of the library want to install using npm install <git-repo> without a tag, just the branch.

A solution I found was to use the prepare script to build the library on install, but I have some questions as I’m not well versed in js packaging:

Will this mean that on every install, even from the npm registry directly, it will build it on their machine?

Will this introduce build discrepancies based on the dev dependencies being updated when installing the library (they are not absolute versioned currently in package.json )

If so, what are some probable solutions to this issue? Keep the distribution folder on SC?