Skip to content

Commit

Permalink
add .assetsignore file generation for adapter-cloudflare-workers
Browse files Browse the repository at this point in the history
  • Loading branch information
methanoya committed Dec 7, 2024
1 parent 32ccc2e commit 0e9b1fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/adapter-cloudflare-workers/files/.assetsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_worker.js
_routes.json
_headers
_redirects
4 changes: 3 additions & 1 deletion packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
import { copyFileSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
import { posix, dirname } from 'node:path';
import { execSync } from 'node:child_process';
import esbuild from 'esbuild';
Expand Down Expand Up @@ -143,6 +143,8 @@ export default function ({ config = 'wrangler.toml', platformProxy = {} } = {})
);
}

copyFileSync(`${files}/.assetsignore`, `${dirname(main)}/.assetsignore`);

builder.log.minor('Copying assets...');
const bucket_dir = `${site.bucket}${builder.config.kit.paths.base}`;
builder.writeClient(bucket_dir);
Expand Down

0 comments on commit 0e9b1fc

Please sign in to comment.