diff --git a/node/index.js b/node/index.js
index 011d04b450687083e7a0ec9023c41ee79104831c..ef26db49d98c60b5b31f3601f6ad045f0b0e8f4f 100644
--- a/node/index.js
+++ b/node/index.js
@@ -1,28 +1,41 @@
-let parts = [process.platform, process.arch];
-if (process.platform === 'linux') {
-  const { MUSL, familySync } = require('detect-libc');
-  const family = familySync();
-  if (family === MUSL) {
-    parts.push('musl');
-  } else if (process.arch === 'arm') {
-    parts.push('gnueabihf');
-  } else {
-    parts.push('gnu');
-  }
-} else if (process.platform === 'win32') {
-  parts.push('msvc');
-}
+function loadPackage() {
+  if (process.platform === 'linux') {
+    if (process.env.PLATFORM_LIBC === 'musl') {
+      return require(`lightningcss-${process.platform}-${process.arch}-musl`)
+    } else if (process.env.PLATFORM_LIBC === 'glibc') {
+      if (process.arch === 'arm') {
+        return require(`lightningcss-${process.platform}-${process.arch}-gnueabihf`)
+      } else {
+        return require(`lightningcss-${process.platform}-${process.arch}-gnu`)
+      }
+    } else {
+      let { MUSL, GLIBC, family, familySync } = require('detect-libc')

-if (process.env.CSS_TRANSFORMER_WASM) {
-  module.exports = require(`../pkg`);
-} else {
-  try {
-    module.exports = require(`lightningcss-${parts.join('-')}`);
-  } catch (err) {
-    module.exports = require(`../lightningcss.${parts.join('-')}.node`);
+      // Bun polyfills `detect-libc` in compiled binaries. We rely on
+      // detect-libc@1.0.3 but the polyfilled version is 2.x. In detect-libc@2x
+      // there is a `familySync` function that we can use instead.
+      if (typeof familySync === 'function') family = familySync()
+
+      if (family === MUSL) {
+        return require(`lightningcss-${process.platform}-${process.arch}-musl`)
+      } else if (family === GLIBC) {
+        if (process.arch === 'arm') {
+          return require(`lightningcss-${process.platform}-${process.arch}-gnueabihf`)
+        } else {
+          return require(`lightningcss-${process.platform}-${process.arch}-gnu`)
+        }
+      } else {
+        throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`)
+      }
+    }
+  } else if (process.platform === 'win32') {
+    return require(`lightningcss-${process.platform}-${process.arch}-msvc`)
+  } else {
+    return require(`lightningcss-${process.platform}-${process.arch}`)
   }
 }

-module.exports.browserslistToTargets = require('./browserslistToTargets');
-module.exports.composeVisitors = require('./composeVisitors');
-module.exports.Features = require('./flags').Features;
+module.exports = loadPackage()
+module.exports.browserslistToTargets = require('./browserslistToTargets')
+module.exports.composeVisitors = require('./composeVisitors')
+module.exports.Features = require('./flags').Features
