Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"allow": [
"Bash(find node_modules/.pnpm -path */start-plugin-core/dist/esm/index.d.ts)",
"Bash(find node_modules/.pnpm -path */start-plugin-core/dist/esm/*.d.ts)",
"Bash(NITRO_PRESET=cloudflare-pages pnpm build)"
"Bash(NITRO_PRESET=cloudflare-pages pnpm build)",
"Bash(timeout 12 npx wrangler pages dev .)"
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "lingui compile && vite build",
"build": "lingui compile && vite build && node scripts/clean-worker-statics.mjs",
"build:analyze": "ANALYZE=true lingui compile && vite build",
"serve": "vite preview",
"format": "biome format",
Expand Down
11 changes: 11 additions & 0 deletions scripts/clean-worker-statics.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { readdirSync, rmSync } from 'node:fs'
import { join } from 'node:path'

const workerDir = 'dist/_worker.js'
const keep = new Set(['index.js', 'wrangler.json', 'chunks'])

for (const entry of readdirSync(workerDir)) {
if (!keep.has(entry)) {
rmSync(join(workerDir, entry), { recursive: true, force: true })
}
}
Comment thread
priom marked this conversation as resolved.
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ const config = defineConfig({
compressPublicAssets: true,
minify: true,
rollupConfig: {
output: {
inlineDynamicImports: true,
},
treeshake: {
moduleSideEffects: false,
propertyReadSideEffects: false,
Expand Down
Loading