-
-
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
Conversation
🦋 Changeset detectedLatest commit: e1d80c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@benmccann it is the webmanifest file, not the sw: pwa plugin will emit We wrote the sw and workbox-*** assets to the client folder via workbox build or rollup. |
With this approach, the static assets get copied into |
Why not just replace static with public folder? I don't need the assets to be written in the output folder. I only need the publicDir to list the assets matching a globPattern. The pwa plugin will use it to include the webmanifest icons in the sw's precache manifest. |
That's just how Vite works. Everything in |
test('Filenames are case-sensitive', async ({ request }) => { | ||
const response = await request.get('/static.JSON'); | ||
expect(response.status()).toBe(404); | ||
}); |
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
This reverts commit 44381e4.
Closing this for now as it doesn't seem feasible until maybe Vite 4 given current limitations in Vite |
Benefits:
publicDir
andbase
are now defined for Vite plugins (should help @userquin with his work supporting SvelteKit invite-plugin-pwa
)I would suggest closing #5115 with a suggestion that the issue be filed in the Vite repo