-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
When I use @astrojs/cloudflare as deploy adapter in adapter field of astro config, all the files generated by vite-pwa are available in dist/_worker.js directory instead of dist.
"astro": "^5.7.9"
"@astrojs/cloudflare": "^12.5.1"
"@vite-pwa/astro": "^1.0.1"
"vite-plugin-pwa": "^1.0.0"
astro.config.ts:
import cloudflare from '@astrojs/cloudflare';
import AstroPWA from '@vite-pwa/astro';
import { defineConfig } from 'astro/config';
// https://astro.build/config
export default defineConfig({
adapter: cloudflare(),
trailingSlash: 'never',
integrations: [
AstroPWA({
registerType: 'autoUpdate',
manifest: {
name: "App",
short_name: "App",
icons: []
},
workbox: {
globDirectory: 'dist',
globPatterns: ['**/*.{js,css,svg,png,jpg,jpeg,gif,webp,woff,woff2,ttf,eot,ico}'],
globIgnores: ['**/_worker.js/**/*'],
// Don't fallback on document based (e.g. `/some-page`) requests
// This removes an errant console.log message from showing up.
navigateFallback: null,
},
experimental: {
directoryAndTrailingSlashHandler: true,
},
}),
],
});
When removing @astrojs/cloudflare adapter, the files are generated in dist
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels