-
Notifications
You must be signed in to change notification settings - Fork 309
feat: support custom image dirs within layers #1880
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
Conversation
|
@wuiyang is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
danielroe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great - thank you! ❤️
would you add unit tests in ssr.test.ts and no-ssr.test.ts, e.g.:
Lines 58 to 72 in aaeb7d5
| it('should emit load and error events', async () => { | |
| const page = await createPage() | |
| const logs: string[] = [] | |
| page.on('console', (msg) => { | |
| logs.push(msg.text()) | |
| }) | |
| await page.goto(url('/events'), { waitUntil: 'networkidle' }) | |
| expect(logs.filter(log => log === 'Image was loaded').length).toBe(4) | |
| expect(logs.filter(log => log === 'Error loading image').length).toBe(2) | |
| await page.close() | |
| }) |
Thank you for the feedback, I couldn't get e2e test to run on my end, not sure if I setup something wrong, I'm using github codespaces to work on the PR |
|
fixed the test suite! you should be able to run e2e tests now.... |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1880 +/- ##
========================================
- Coverage 7.06% 7.03% -0.03%
========================================
Files 77 77
Lines 3555 3569 +14
Branches 138 138
========================================
Hits 251 251
- Misses 3256 3270 +14
Partials 48 48 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
apologize for slow update on PR, was busy with work for the last month and now got the time to add test into it |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
danielroe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you ❤️
and my apologies for taking so long to review.
🔗 Linked issue
resolves #1879
❓ Type of change
📚 Description
For Nuxt project that uses
IPXprovider, it would not search nuxt layer's custom dir.This changes allows Nuxt project with local layers to look for image in layer's
dir.Note: with this changes, similar to root nuxt config with customdir, would not work for runtime IPX, and only works foripxStaticprovider.Note 2: As
nuxt.optionscompiles all layer's config, if root is using default config (not providing any), it will have layer'sdirvalue. The imagedirconfig will retrieve from layer's config instead to prevent this issue.