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

feat(vite): support build.transpile as function #7767

Merged
merged 11 commits into from
Jan 19, 2023
Merged

feat(vite): support build.transpile as function #7767

merged 11 commits into from
Jan 19, 2023

Conversation

jmorel88
Copy link
Contributor

@jmorel88 jmorel88 commented Sep 22, 2022

πŸ”— Linked issue

nuxt/nuxt#14729

❓ 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

Resolves nuxt/nuxt#14729 - When building Nuxt with Vite, build.transpile will now except functions. This will allow users to transpile modules through Vite's pipeline.

Additional notes

  • I've added isClient, isServer, and isDev to the ctx. Although for now this is only used with Vite's SSR property.
  • I left out isLegacy and isModern because it seems irrelevant when using Vite. Is this correct?

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Sep 22, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Sep 22, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit c247005
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/63494eb46272260009ef5416

@pi0 pi0 changed the title fix(vite): build.transpile function feat(vite): support build.transpile as function Sep 26, 2022
@FarhanShares
Copy link

@pi0 @jmorel88 can we have this merged please? It's really needed in some cases.

Some libraries / modules works on dev server without transpilation & doesn't work on production build and vice versa. For example https://github.com/aspida/aspida (their @aspida/axios package).

@danielroe danielroe requested a review from pi0 January 14, 2023 00:22
@danielroe danielroe merged commit baf9d95 into nuxt:main Jan 19, 2023
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe mentioned this pull request Jan 20, 2023
danielroe added a commit that referenced this pull request Jan 21, 2023
Co-authored-by: Daniel Roe <daniel@roe.dev>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for functional build.transpile with vite builder
4 participants