Skip to content

upgrade: script-loader package upgrade for Solid 2.0#872

Draft
davedbase wants to merge 2 commits intosolidjs-community:nextfrom
davedbase:update/v2/script-loader
Draft

upgrade: script-loader package upgrade for Solid 2.0#872
davedbase wants to merge 2 commits intosolidjs-community:nextfrom
davedbase:update/v2/script-loader

Conversation

@davedbase
Copy link
Copy Markdown
Member

Imports isServer, assign, ComponentProps, and JSX from @solidjs/web (previously solid-js/web / solid-js)

  • Replaced the removed splitProps with plain JS iteration to extract src, event handlers, and static attributes
  • Static props now applied via assign(script, staticProps, true) synchronously — this is actually an improvement over the original setTimeout(() => spread(...)) because attributes like type and async are now set before the script is appended, which is the correct browser behavior
  • Event listener registration moved outside the reactive effect (handlers are static, no need to re-register reactively)
  • createRenderEffect converted to the split compute/apply form: `createRenderEffect(() => srcValue, src => { ... })

@davedbase davedbase added this to the Solid 2.0 Migration milestone May 5, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

🦋 Changeset detected

Latest commit: a874e98

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/script-loader Major

Not sure what this means? Click here to learn what changesets are.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant