Skip to content

Conversation

@lihbr
Copy link
Member

@lihbr lihbr commented Jan 14, 2026

Resolves:

Description

This PR updates the Slice Simulator page templates generated during project initialization to import the <SliceSimulator> component from its new location in the main SDK packages instead of the adapter's /simulator subpath.

Changes by adapter:

  • Next.js (adapter-next):

    • App Router: Imports from @prismicio/next instead of @slicemachine/adapter-next/simulator
    • Pages Router: Imports from @prismicio/next/pages instead of @slicemachine/adapter-next/simulator
  • Nuxt (adapter-nuxt):

    • Removed the explicit SliceSimulator import (now auto-imported by the Nuxt module)
    • Reordered Vue SFC to place <script> before <template> (follows Vue style guide recommendation)
  • SvelteKit (adapter-sveltekit):

    • Combined SliceSimulator and SliceZone imports from @prismicio/svelte instead of importing SliceSimulator from @slicemachine/adapter-sveltekit/simulator

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

N/A — This change affects generated code during project initialization, not visual components.

How to QA 1

  1. Create a new project with each adapter (Next.js App Router, Next.js Pages Router, Nuxt, SvelteKit)
  2. Verify the generated Slice Simulator page imports SliceSimulator from the correct package:
    • Next.js App Router: @prismicio/next
    • Next.js Pages Router: @prismicio/next/pages
    • Nuxt: No explicit import (auto-imported)
    • SvelteKit: @prismicio/svelte
  3. Verify the Slice Simulator page works correctly in each framework

🎉

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@lihbr lihbr requested a review from a team as a code owner January 14, 2026 02:54
@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
slice-machine Ready Ready Preview Jan 14, 2026 2:59am

Copy link
Member

@angeloashmore angeloashmore left a comment

Choose a reason for hiding this comment

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

LGTM!

@lihbr lihbr merged commit 1b940ee into main Jan 14, 2026
33 checks passed
@lihbr lihbr deleted the lh/simulator branch January 14, 2026 23:23
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.

3 participants