Skip to content

Conversation

Copy link

Copilot AI commented Jan 8, 2026

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature Request] Conditional imports</issue_title>
<issue_description>### Description

Allow importing a file only if a condition is met. For example:

# @import(./.env.some-file, enabled=eq(SOME_VAR, "some val")
# ---

Proposed Solution

Add a new enabled property to the @import decorator which will decide whether or not to proceed based on some boolean.

Alternatives

Currently, you could always import the file and use @disabled

Alternatively, we could think about introducing a higher level if block concept, that could enable/disable multiple arbitrary lines within the env file. Not sure it is worth the complexity.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2026

⚠️ No Changeset found

Latest commit: 7206b43

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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.

[Feature Request] Conditional imports

2 participants