-
Notifications
You must be signed in to change notification settings - Fork 295
feat: added image dir support for nuxt layer #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
base: main
Are you sure you want to change the base?
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: |
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.08% 7.08%
=====================================
Files 76 76
Lines 3527 3527
Branches 137 137
=====================================
Hits 250 250
Misses 3230 3230
Partials 47 47 β 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
|
π Linked issue
resolves #1879
β Type of change
π Description
For Nuxt project that uses
IPX
provider, 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 custom
dir
, would not work for runtime IPX, and only works foripxStatic
provider.Note 2: As
nuxt.options
compiles all layer's config, if root is using default config (not providing any), it will have layer'sdir
value. The imagedir
config will retrieve from layer's config instead to prevent this issue.