Skip to content

Make JS APIs available to plugins and configs in the Standalone CLI#15934

Merged
philipp-spiess merged 7 commits into
mainfrom
fix/v4-standalone-cli-js-apis
Feb 25, 2025
Merged

Make JS APIs available to plugins and configs in the Standalone CLI#15934
philipp-spiess merged 7 commits into
mainfrom
fix/v4-standalone-cli-js-apis

Conversation

@thecrypticace

@thecrypticace thecrypticace commented Jan 27, 2025

Copy link
Copy Markdown
Contributor

This PR ensures we bundle the relevant JS APIs in the Standalone CLI like tailwindcss, tailwindcss/plugin, tailwindcss/colors, etc…

Before, when loading plugins or configs, imports for those resources would fail.

Fixes #15235

@thecrypticace

This comment was marked as resolved.

@thecrypticace

This comment was marked as resolved.

@thecrypticace thecrypticace force-pushed the fix/v4-standalone-cli-js-apis branch from 3284714 to 45c9de9 Compare February 1, 2025 13:33
@thecrypticace

thecrypticace commented Feb 1, 2025

Copy link
Copy Markdown
Contributor Author

Looks like we're going to need another fix in Bun (or some other workaround).

Edit: Weirdly this works when building locally on Windows x64. Maybe something about the setup on GitHub Actions? Will have to keep testing.

Windows binary asset bundling appears to be broken (maybe a v1.2.x bug?)

Error: ENOENT: no such file or directory, open 'B:/~BUN/root/theme-j614ahvp.css'
21035 |     };
21036 |   };
21037 | });
21038 | 
21039 | // ../../node_modules/.pnpm/@parcel+watcher-win32-x64@2.5.0/node_modules/@parcel/watcher-win32-x64/watcher.node
21040 |   module.exports = __require("B:/~BUN/root/watcher-fqkqe3hc.node");

error: LoadLibrary failed: The specified module 
 code: "ERR_DLOPEN_FAILED"
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:21040:29)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:18:47)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:21052:42)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:18:47)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:62069:44)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:28:48)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:62154:13)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:28:48)
      at <anonymous> (B:/~BUN/root/tailwindcss-windows-x64.exe:62276:46)

Bun v1.2.2 (Windows x64 baseline)

@stefanchrobot

Copy link
Copy Markdown

Related issue: #15235

@thecrypticace

thecrypticace commented Feb 5, 2025

Copy link
Copy Markdown
Contributor Author

I've reproduced the Bun issue on my Windows machine now. It appears that the issue happens when you compile a standalone executable on Windows and are not on the C: drive. GitHub Actions runs all Windows stuff on the D: drive (presumably b/c it's a "throwaway" mount of sorts)

Nevermind, the C: drive is affected too. I was building using an old version of Bun when on the C: drive previously.

@thecrypticace

Copy link
Copy Markdown
Contributor Author

I've filed a bug here: oven-sh/bun#17082

@thecrypticace thecrypticace force-pushed the fix/v4-standalone-cli-js-apis branch 2 times, most recently from 50f0977 to d04074b Compare February 6, 2025 18:30
@thecrypticace thecrypticace force-pushed the fix/v4-standalone-cli-js-apis branch from 17884b5 to 041d16f Compare February 22, 2025 11:54
@thecrypticace thecrypticace force-pushed the fix/v4-standalone-cli-js-apis branch 2 times, most recently from e50177a to be82038 Compare February 22, 2025 12:12
@thecrypticace thecrypticace marked this pull request as ready for review February 22, 2025 12:12
@thecrypticace thecrypticace requested a review from a team as a code owner February 22, 2025 12:12

@philipp-spiess philipp-spiess left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noice!

Comment thread integrations/cli/standalone.test.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v4] Standalone cli doesn't bundle tailwindcss js library

3 participants