faucet-pipeline / faucet-pipeline-js

JavaScript asset pipeline
Apache License 2.0
7 stars 6 forks source link

Add experimental support for symlinked modules #231

Open micha149 opened 11 months ago

micha149 commented 11 months ago

When linking external dependencies using npm_link, rollups commonjs plugin does not process files in the symlinked directory correctly. To support this, rollup need the preserveSymlinks setting to be true.

Since we cannot assess at the moment whether this setting will break some other build, we put it behind an experimental flag. So you need to set the environment varialbe FAUCET_EXPERIMENTAL_SYMLINKS to "true" to enable preserving symlinks.

moonglum commented 11 months ago

Great work, thanks @micha149 :bow:

Seeing it like that makes me wonder whether the unofficial hack via an environment variable is really necessary. I know I was the one to propose that in order to avoid expanding the official API's surface area, but now I'm wondering whether we might just turn it into a regular configuration option. That of course means finding a suitable name, consistent with established patterns, and adding documentation...

I would also say: Let's not introduce an environment variable because this would be (afaik) the first one we introduce. Let's stick with configuration options in the configuration file :+1: Apart from that and the nitpicks, this is ready to go from my point of view.