Skip to content

feat: add new directives plugin#2070

Open
lxsmnsyc wants to merge 8 commits intomainfrom
feat-directives
Open

feat: add new directives plugin#2070
lxsmnsyc wants to merge 8 commits intomainfrom
feat-directives

Conversation

@lxsmnsyc
Copy link
Member

This PR intends to replace the current directives plugin (TanStack) with our own.

Features:

  • shorter function ids
    • previous plugin used SHA, which produced a very long id. The new one has shorter length (around 8 characters as uid) and has a descriptive name for easier debugging.
  • API change
    • previously we only required createServerReference. This limited the server functions for only top-level declaration. The new plugin now allows inner declarations via cloning (this introduces a new API called cloneServerReference), so now the server functions are able to be registered ahead of time while deferring the actual instance in the exact time it is declared by intention.
    • the previous manifest mechanism is deprecated by server preloading. The plugin keeps track which files has the server functions and then preloads those ahead of time. The function lookup is now done through a map so we don't need to do some dynamic imports. Not sure of the repercussions but there shouldn't be any issues.
  • backwards compatibility
    • should still retain the required features
  • proper treeshaking
    • previous plugin didn't remove some code from a module with a module-level directive. The new one creates an entirely new module from scratch.
  • aliasing
    • the new plugin can now keep track if the server function is exported by alias, so it will be able to retain the export.

@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit bff6eac
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/69983c01c812400008158fb9
😎 Deploy Preview https://deploy-preview-2070--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link

changeset-bot bot commented Feb 19, 2026

⚠️ No Changeset found

Latest commit: bff6eac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/start@2070
npm i https://pkg.pr.new/solidjs/solid-start/@solidjs/vite-plugin-nitro-2@2070

commit: bff6eac

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.

1 participant

Comments