Skip to content

fix: allow overriding specific build output files with aliases#328

Closed
danielroe wants to merge 2 commits intomainfrom
fix/override-build
Closed

fix: allow overriding specific build output files with aliases#328
danielroe wants to merge 2 commits intomainfrom
fix/override-build

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Jul 6, 2022

🔗 Linked issue

nuxt/nuxt#13986

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

In some cases, such as the linked issue (which we could resolve by adding an alias to a stub file in the case of ssr: false), it is helpful to be able to override individual #build/some-file.js aliases, and to do this we need #build to be defined last in the object.

📝 Checklist

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

@pi0
Copy link
Copy Markdown
Member

pi0 commented Jul 7, 2022

We have dynamic virtual imports (https://nitro.unjs.io/config/#virtual) that can be used in order to override any import. (I made this feature initially for linked issue in fact)

env.alias can be used to override other aliases for any similar situation.

@pi0 pi0 closed this Jul 7, 2022
@danielroe danielroe deleted the fix/override-build branch September 14, 2022 13:29
@danielroe danielroe restored the fix/override-build branch September 14, 2022 13:29
@danielroe danielroe deleted the fix/override-build branch September 14, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants