-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Alpine Linux: Can I use system installed libsass for speedier installation? #1587
Comments
This isn't building the libsass binary, it's building the binding that node-sass needs to use libsass. node-sass has pre-built binaries for a lot of platforms, but Alpine is not one of them. I have the same issue, I'll look into making a PR that builds the binary for alpine over the weekend if I have time. |
Okay thanks for making this more clearer :). If you would want to make a PR that would be awesome. I'm not sure how to do this but I'm happy to try if you want to share some directions first. |
Well, that's not quite true: the log above shows the compiler building both libsass and the binding, this way a single independent module can be prepared and that's the way we build the binaries for download. There is a slightly unsupported way to build node-sass with a system libsass. In fact I am using it to build FreeBSD binaries. One big caveat though: you need to be 100% sure you match a right libsass version with a correct node-sass version. Version numbers do not match, you have to check How to do it? #763 introduced It is possible to compile-in a previously prepared static library, but you need to build it in a special way. I am preparing it after I am done building libsass during my custom FreeBSD package build. So be very very careful with it. The process works since I use it for every release. |
But anyway: once you compile the binding (statically with npm or otherwise), you can just copy it around if you have the same target system and the same node version. |
We're working on Alpine Linux support in #1589 and could use your help! |
Fix incorrect coersion of rest arguments
What I'm trying to do:
I would want to use node-sass inside a alpine linux docker container.
What I was expecting:
I thought that node-sass would automatically pick up the libsass libraries or
sassc
binary installed in system.What I got instead:
Compiling libsass at a start of every project takes too long.
Can I use preinstalled libsass libraries or
sassc
binary with some flags instead of building it from scratch everytime?Here's my log file:
The text was updated successfully, but these errors were encountered: