Skip to content

Commit

Permalink
chore(radio): update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vittee committed Mar 24, 2024
1 parent 8844ac6 commit 1161606
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
"dev:bot": "cross-env DEBUG=1 ts-node src/discord/bot_main.ts",
"debug:bot": "cross-env DEBUG=1 tsx --inspect --trace-warnings src/discord/bot_main.ts",
"combine-discord": "tsx scripts/combine-discord.ts",
"build": "tsc --build",
"vb": "vite build"
"combine-discord:docker": "docker build -f ./docker/discord/Dockerfile -t medley/combine ../..",
"build": "concurrently -n build: pnpm:build:*",
"build:server": "tsc --build tsconfig.build.json",
"build:react": "vite build"
},
"dependencies": {
"@commander-js/extra-typings": "^12.0.1",
Expand Down
7 changes: 7 additions & 0 deletions packages/radio/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": [
"src/poc-*",
"src/ui"
]
}
25 changes: 25 additions & 0 deletions packages/radio/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,30 @@ export default defineConfig({
ws: true
}
}
},
build: {
outDir: '../../../dist/ui',
emptyOutDir: false,
chunkSizeWarningLimit: 640,
rollupOptions: {
output: {
manualChunks: {
lodash: ['lodash'],
ui: [
'react', 'react-dom', '@tanstack/react-router',
'@mantine/core', '@mantine/hooks',
'polished', 'framer-motion'
]
},
assetFileNames: 'assets/[ext]/[name]-[hash][extname]'
},
onwarn: (warning, handler) => {
if (['SOURCEMAP_ERROR', 'INVALID_ANNOTATION'].includes(warning.code ?? '')) {
return;
}

handler(warning);
}
}
}
});

0 comments on commit 1161606

Please sign in to comment.