-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
set Vite's publicDir
and base
options
#5601
Changes from all commits
6e0d0bd
e1d9529
1eebe2e
9600c7b
cc958dd
63724ef
08edcc6
3073800
8600c38
da434e9
5edd5f3
e4e9033
1f65e05
9aed215
4521b11
f1e22db
c7bc94e
0c7c581
9cbd92c
9ec256e
f01e437
ed99a2f
5b62370
ded83da
ea1bb13
c1457a2
e74f728
a382755
eee66db
14b7875
774b70c
5ef88c7
44381e4
2798f9d
e1d80c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
'@sveltejs/adapter-node': patch | ||
--- | ||
|
||
[breaking] set Vite's `publicDir` and `base` options |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ test.describe.configure({ mode: 'parallel' }); | |
|
||
test.describe('paths.base', () => { | ||
test('serves /basepath', async ({ page }) => { | ||
await page.goto('/basepath'); | ||
await page.goto('/basepath/'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the reason for this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vite only serves the index page with a trailing slash There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related issue: vitejs/vite#8770 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay, but the path is incorrect |
||
expect(await page.textContent('h1')).toBe('Hello'); | ||
}); | ||
|
||
|
@@ -28,7 +28,7 @@ test.describe('Service worker', () => { | |
}); | ||
|
||
test('does not register /basepath/service-worker.js', async ({ page }) => { | ||
await page.goto('/basepath'); | ||
await page.goto('/basepath/'); | ||
expect(await page.content()).not.toMatch(/navigator\.serviceWorker/); | ||
}); | ||
}); |
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.
why was this test deleted?
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.
Vite does not check case sensitivity
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.
Right, but many servers do, so it's essential that we do too — if we can't get Vite to be strict about casing it's a showstopper for this PR