Skip to content

Commit

Permalink
[demo]build for cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
dufu1991 committed Dec 13, 2024
1 parent 70f57de commit 61bfd70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/stdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"tailwindcss": "^3.4.0"
},
"devDependencies": {
"@sveltejs/adapter-cloudflare": "^4.8.0",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/package": "^2.3.7",
"@sveltejs/vite-plugin-svelte": "^5.0.2",
Expand Down
15 changes: 2 additions & 13 deletions packages/stdf/svelte.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-cloudflare';
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { Config } from '@sveltejs/kit';

Expand All @@ -8,18 +8,7 @@ const config: Config = {
preprocess: vitePreprocess(),

kit: {
adapter: adapter({
// See below for an explanation of these options
routes: {
include: ['/*'],
exclude: ['<all>']
},
platformProxy: {
configPath: 'wrangler.toml',
environment: undefined,
persist: false
}
})
adapter: adapter()
}
};

Expand Down
13 changes: 1 addition & 12 deletions packages/stdf/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,5 @@ import svgSprite from 'rollup-plugin-stdf-icon';

export default defineConfig({
plugins: [sveltekit(), svgSprite([{ inFile: 'src/assets/svgs', outFile: 'static/fonts', fileName: 'symbol' }])],
server: { hmr: true, host: '0.0.0.0', port: 8888 },
build: {
rollupOptions: {
output: {
manualChunks: (id: string) => {
if (id.includes('node_modules')) {
return 'vendor/index';
}
}
}
}
}
server: { hmr: true, host: '0.0.0.0', port: 8888 }
});

0 comments on commit 61bfd70

Please sign in to comment.