Skip to content

feat: dev presets#3467

Merged
pi0 merged 3 commits intov2from
feat/v2-dev-presets
Jul 13, 2025
Merged

feat: dev presets#3467
pi0 merged 3 commits intov2from
feat/v2-dev-presets

Conversation

@pi0
Copy link
Member

@pi0 pi0 commented Jul 12, 2025

This PR adds support for built-in dev presets to be implemented, emulating closer to production environment and adding any additional primitives.

export const presetDev = defineNitroPreset(
  {
    extends: "nitro-dev",
    // hooks and extended config for env emulation
  },
  {
    name: "preset",
    dev: true,
    url: import.meta.url,
  }
);

This change is a little bit risky, especially for wrapper frameworks but should work well.

Checklist for meta frameworks:

  • For dev, preset: "nitro-dev" should not be hardcoded
  • typescript.generateRuntimeConfigTypes should be disabled as before if framework.name is set

@pi0 pi0 changed the base branch from v3 to v2 July 12, 2025 14:37
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 12, 2025

Deploying nitrojs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 501d550
Status:⚡️  Build in progress...

View logs

@pi0 pi0 changed the title feat/v2 dev presets feat: dev presets Jul 12, 2025
@pi0 pi0 marked this pull request as ready for review July 13, 2025 20:36
@pi0 pi0 merged commit 4753575 into v2 Jul 13, 2025
4 of 5 checks passed
@pi0 pi0 deleted the feat/v2-dev-presets branch July 13, 2025 20:42
luc122c pushed a commit to luc122c/unjs-nitro that referenced this pull request Jul 17, 2025
pi0 added a commit that referenced this pull request Jul 18, 2025
@Hebilicious Hebilicious mentioned this pull request Sep 14, 2025
8 tasks
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