Skip to content

feat: environment specific event handlers - #2272

Merged
pi0 merged 8 commits into
nitrojs:mainfrom
HigherOrderLogic:feat/dev-route
Apr 4, 2024
Merged

pi0 merged 8 commits into
nitrojs:mainfrom
HigherOrderLogic:feat/dev-route

Conversation

@HigherOrderLogic

@HigherOrderLogic HigherOrderLogic commented Mar 17, 2024 •

Copy link
Copy Markdown
Contributor

🔗 Linked issue

#1849

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

(updated by @pi0) This PR adds support for the environment-specific event handler filtering.

The conditions can be specified via filenames with .dev, .prod or .prerender or programmatically via env: [] option.

The default conditions to match are dev, prod, prerender or preset name this way we can make event handlers that only work in specific preset only.

--

Add the ablity to exclude a routes in production build by adding the .dev suffix.

I'm not sure if this should also apply to middlewares too.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@HigherOrderLogic HigherOrderLogic changed the title feat: .dev prefix for dev only route feat: .dev suffix for dev only route Mar 18, 2024
@pi0 pi0 changed the title feat: .dev suffix for dev only route feat: environment specific event handlers Apr 4, 2024
@pi0 pi0 changed the title feat: environment specific event handlers feat: environment specific scanned event handlers Apr 4, 2024
@pi0
pi0 marked this pull request as draft April 4, 2024 15:56
@pi0 pi0 changed the title feat: environment specific scanned event handlers feat: environment specific event handlers Apr 4, 2024
@pi0
pi0 marked this pull request as ready for review April 4, 2024 18:21
@pi0
pi0 merged commit c5d550a into nitrojs:main Apr 4, 2024
@pi0

pi0 commented Apr 4, 2024

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants