Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support regexps in external options #1388

Merged
merged 3 commits into from
Jul 3, 2023
Merged

feat: support regexps in external options #1388

merged 3 commits into from
Jul 3, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ 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

I'm hoping to move more inlining from vite server build -> nitro build to avoid duplication of libraries. (e.g. h3 createError, some vue dependencies, anything shared between vite + nitro builds, etc.)

Part of that means being able to respect Nuxt's build.transpile which may include RegExps, and the best way would be to be able to pass those options on to nitro externals options.

πŸ“ Checklist

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

@danielroe danielroe added the enhancement New feature or request label Jul 3, 2023
@danielroe danielroe requested a review from pi0 July 3, 2023 19:48
@danielroe danielroe self-assigned this Jul 3, 2023
@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #1388 (bbc9629) into main (1d0c120) will increase coverage by 0.08%.
The diff coverage is 72.46%.

@@            Coverage Diff             @@
##             main    #1388      +/-   ##
==========================================
+ Coverage   76.64%   76.73%   +0.08%     
==========================================
  Files          71       71              
  Lines        7241     7273      +32     
  Branches      723      727       +4     
==========================================
+ Hits         5550     5581      +31     
- Misses       1690     1691       +1     
  Partials        1        1              
Impacted Files Coverage Ξ”
src/rollup/plugins/externals-legacy.ts 9.35% <47.82%> (+2.55%) ⬆️
src/rollup/plugins/externals.ts 94.41% <83.72%> (-0.89%) ⬇️
src/build.ts 85.55% <100.00%> (+0.03%) ⬆️
src/presets/cloudflare-module.ts 100.00% <100.00%> (ΓΈ)
src/presets/cloudflare.ts 100.00% <100.00%> (ΓΈ)

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

This looks a nice addition. Shall we support functions in same iteration as well? might help to do some early refactors while was looking at code like making shared inline util for filter and normalize.

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

πŸ’―

@pi0 pi0 merged commit 1950d1e into main Jul 3, 2023
@pi0 pi0 deleted the feat/regexp-externals branch July 3, 2023 22:03
@pi0 pi0 mentioned this pull request Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants