Skip to content

feat: add Vue support#100

Open
colinaaa wants to merge 2 commits intov4from
feat/vue-support
Open

feat: add Vue support#100
colinaaa wants to merge 2 commits intov4from
feat/vue-support

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

Summary

  • Update transform regex to include .vue files.
  • Add test case for Vue support.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f789203882

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

src/index.ts Outdated
api.transform(
{
test: { and: [/\.(jsx?|tsx?)$/, { not: [/node_modules/] }] },
test: { and: [/\.(jsx?|tsx?|vue)$/, { not: [/node_modules/] }] },
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exclude Vue subresource requests from transform

Narrow this matcher before enabling .vue: api.transform rules match by resourcePath, so Vue SFC subrequests like App.vue?vue&type=style... still satisfy /\.(jsx?|tsx?|vue)$/. That makes this transform run on non-entry Vue submodules and prepend a JS import to code that is not the main SFC module, which can break builds for common components that include <style> blocks. Add a resourceQuery guard (or equivalent) so only the intended Vue module request is transformed.

Useful? React with 👍 / 👎.

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