You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@tailwindcss/oxide-wasm32-wasi 4.3.4 dropped "cpu": ["wasm32"], so npm installs the WASI fallback on every platform #20685
Title: @tailwindcss/oxide-wasm32-wasi 4.3.4 dropped "cpu": ["wasm32"], so npm installs the WASI fallback on every platform
What changed
@tailwindcss/oxide-wasm32-wasi 4.3.3 declares "cpu": ["wasm32"] in its package.json. 4.3.4 and 4.3.5 declare no cpu field. Its engines.node also changed from >=14.0.0 to ^20.19.0 || ^22.13.0 || >=23.5.0.
Reproduction (npm 11.19.1, Node 24.22.2, Linux x64)
npm view @tailwindcss/[email protected] cpu --json # ["wasm32"]
npm view @tailwindcss/[email protected] cpu --json # (empty: no cpu field)
npm view @tailwindcss/[email protected] cpu --json # (empty: no cpu field)
Install effect, with a project on tailwindcss + @tailwindcss/vite 4.3.3:
npm ls @tailwindcss/oxide-wasm32-wasi is empty. node_modules/@tailwindcss contains node, oxide, oxide-linux-x64-gnu and vite. The lockfile entry for the wasm package has "cpu": ["wasm32"], so npm skips it on x64.
npm install [email protected] @tailwindcss/[email protected] (a patch bump). node_modules/@tailwindcss/oxide-wasm32-wasi is now installed (about 6.7 MB on disk, 115 files). The lockfile gains six inBundle entries under it: @emnapi/core, @emnapi/runtime, @emnapi/wasi-threads, @napi-rs/wasm-runtime, @tybys/wasm-util and tslib. The wasm package's own lockfile entry no longer has "cpu".
(4.3.5 was not installed; its registry metadata matches 4.3.4.)
Expected
A patch release does not change which platforms install the WASI fallback. Either the package keeps "cpu": ["wasm32"], as in 4.3.3, or the change is intentional and documented, for example in the changelog.
Actual
Every platform, including Linux, macOS and Windows CI runners and Vercel builds, installs about 6.7 MB of WASI fallback plus six bundled packages that nothing loads. @tailwindcss/oxide/index.js still prefers the native binding and only falls back to WASI when native loading fails or NAPI_RS_FORCE_WASI is set, so there is no functional break, only install size and lockfile churn.
Impact
The lockfile diff for a patch bump grows by six packages and install size grows on every platform. We are holding tailwindcss and @tailwindcss/vite at 4.3.3 until the restriction is restored or we decide to accept the fallback.
Is dropping cpu intentional (for example, so the fallback can be installed with --cpu=wasm32 or on unsupported platforms)? If so, a note in the release notes would help. If not, please restore the field.
The removal of "cpu": ["wasm32"] is intentional. It was part of #20383, which makes @tailwindcss/oxide-wasm32-wasi a universal fallback for platforms that have no prebuilt native binding (for example OpenBSD, s390x, OpenHarmony, …). Before that change, users on those platforms got a Cannot find native binding error.
The loader in @tailwindcss/oxide already knew how to fall back to the WASM build. But with "cpu": ["wasm32"], npm and pnpm never installed that package on real hardware, so the fallback was never there when it was needed. A package manager can't express "install this only if no other optional dependency matches", so the only way to make the fallback available is to install it on every platform. As you noticed, the native binding still wins whenever it exists, and the WASM build is only loaded when the native binding can't be loaded (or when NAPI_RS_FORCE_WASI is set).
The 4.3.4 changelog mentions this as "Ensure @tailwindcss/oxide falls back to WASM on platforms without native bindings", but you're right that it doesn't spell out the install side effect. Sorry about that!
If you want to skip the WASM fallback because you know you're always on a platform with a native binding:
pnpm: remove it with an override in pnpm-workspace.yaml:
npm: npm has no setting to skip a single optional dependency. Don't use --omit=optional for this, because it also removes the native binding (e.g. @tailwindcss/oxide-linux-x64-gnu), and then nothing can load at all.
I'll close this one since this is the expected behavior, but thanks again for flagging it!
Activity
chore(deps): ignore tailwindcss and @tailwindcss/vite 4.3.4 and 4.3.5…
RobinMalfait commentedon Nov 9, 2026
Hey! Thanks for the detailed report.
The removal of
"cpu": ["wasm32"]is intentional. It was part of #20383, which makes@tailwindcss/oxide-wasm32-wasia universal fallback for platforms that have no prebuilt native binding (for example OpenBSD, s390x, OpenHarmony, …). Before that change, users on those platforms got aCannot find native bindingerror.The loader in
@tailwindcss/oxidealready knew how to fall back to the WASM build. But with"cpu": ["wasm32"], npm and pnpm never installed that package on real hardware, so the fallback was never there when it was needed. A package manager can't express "install this only if no other optional dependency matches", so the only way to make the fallback available is to install it on every platform. As you noticed, the native binding still wins whenever it exists, and the WASM build is only loaded when the native binding can't be loaded (or whenNAPI_RS_FORCE_WASIis set).The 4.3.4 changelog mentions this as "Ensure
@tailwindcss/oxidefalls back to WASM on platforms without native bindings", but you're right that it doesn't spell out the install side effect. Sorry about that!If you want to skip the WASM fallback because you know you're always on a platform with a native binding:
pnpm-workspace.yaml:ignoredOptionalDependenciessetting does the same:--omit=optionalfor this, because it also removes the native binding (e.g.@tailwindcss/oxide-linux-x64-gnu), and then nothing can load at all.I'll close this one since this is the expected behavior, but thanks again for flagging it!
Sent by an AI assistant on behalf of @RobinMalfait.
Clarify the install effect of the WASM fallback in the 4.3.4 changelog (