Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt3): add macro transform to non-sfcs #2804

Merged
merged 1 commit into from
Jan 19, 2022
Merged

fix(nuxt3): add macro transform to non-sfcs #2804

merged 1 commit into from
Jan 19, 2022

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#13263

❓ 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

Non SFC page files weren't being processed.

πŸ“ Checklist

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

@danielroe danielroe added bug Something isn't working nuxt3 πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Jan 19, 2022
@danielroe danielroe requested a review from pi0 January 19, 2022 09:45
@danielroe danielroe self-assigned this Jan 19, 2022
@netlify
Copy link

netlify bot commented Jan 19, 2022

βœ”οΈ Deploy Preview for nuxt3-docs canceled.

πŸ”¨ Explore the source changes: 1346ba9

πŸ” Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/61e7ddcbfb45920007040933

@pi0 pi0 merged commit c1a6801 into main Jan 19, 2022
@pi0 pi0 deleted the fix/non-sfc-macros branch January 19, 2022 18:11
// We only process SFC files for macros
return parseURL(id).pathname.endsWith('.vue')
const { search, pathname } = parseURL(id)
return pathname.endsWith('.vue') || parseQuery(search).macro
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be updated to support .js extension?

Copy link
Member Author

Choose a reason for hiding this comment

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

This already supports any extension when importing ?meta (that's the second test). You're right, it might be better to expand this test somewhat, however.

@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working nuxt3 πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The requested module does not provide an export named 'meta'
3 participants