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 8f293e9 commit 70f57de
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 19 deletions.
26 changes: 13 additions & 13 deletions packages/stdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,26 +142,26 @@
"tailwindcss": "^3.4.0"
},
"devDependencies": {
"@sveltejs/adapter-static": "^3.0.6",
"@sveltejs/kit": "^2.8.5",
"@sveltejs/adapter-cloudflare": "^4.8.0",
"@sveltejs/kit": "^2.11.1",
"@sveltejs/package": "^2.3.7",
"@sveltejs/vite-plugin-svelte": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^5.0.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.15.0",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.46.0",
"globals": "^15.12.0",
"prettier": "^3.4.1",
"eslint-plugin-svelte": "^2.46.1",
"globals": "^15.13.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.9",
"publint": "^0.2.12",
"rollup-plugin-stdf-icon": "^0.0.15",
"svelte": "^5.2.10",
"svelte-check": "^4.1.0",
"rollup-plugin-stdf-icon": "file:../rollup-plugin-stdf-icon",
"svelte": "^5.12.0",
"svelte-check": "^4.1.1",
"svelte-confetti": "^2.2.0",
"tailwindcss": "^3.4.15",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2",
"typescript-eslint": "^8.16.0",
"vite": "^6.0.1"
"typescript-eslint": "^8.18.0",
"vite": "^6.0.3"
}
}
18 changes: 13 additions & 5 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-static';
import adapter from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { Config } from '@sveltejs/kit';

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

kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter({ pages: 'build', assets: 'build', fallback: '404.html' })
adapter: adapter({
// See below for an explanation of these options
routes: {
include: ['/*'],
exclude: ['<all>']
},
platformProxy: {
configPath: 'wrangler.toml',
environment: undefined,
persist: false
}
})
}
};

Expand Down
1 change: 0 additions & 1 deletion packages/stdf/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ 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: {
assetsDir: 'build',
rollupOptions: {
output: {
manualChunks: (id: string) => {
Expand Down

0 comments on commit 70f57de

Please sign in to comment.