Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat(minor): add bud.spa single page application facade #2632

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kellymears
Copy link
Member

@kellymears kellymears commented Jul 28, 2024

Add bud.spa method for compatibility with single page application routing (React Router, et al). Called with the same signature as bud.setUrl, bud.setPublicUrl, bud.setProxyUrl, etc. Not passing anything is also fine if bud.js defaults are cool.

bud.spa()
bud.spa(3030)
bud.spa(`http://example.com:3030`)
bud.spa(new URL(`http://example.com:3030`))

Changes

  • Add: bud.spa facade to @roots/bud-api
  • Docs: Add /reference/spa documentation page
  • Test: Add bud.spa tests

Notes

The equivalent of:

bud
  .setUrl(url)
  .setProxyUrl(url)
  .hooks.on(
    `dev.middleware.proxy.options.ignorePath`, 
    true
  )

Type of change

MINOR: feature

@github-actions github-actions bot added @roots/bud-api docs internal repository specific PR or issue test labels Jul 28, 2024
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