feat: fix build scripts and server
This commit is contained in:
parent
f3c9d8b54c
commit
a4bb3cce5f
7 changed files with 605 additions and 929 deletions
|
|
@ -19,35 +19,6 @@ export default defineConfig(({ isSsrBuild }) => {
|
|||
// If we have the Headplane entry we build it as a single
|
||||
// server/prod.mjs file that is built for production server bundle
|
||||
// We know the remix invoked command is vite:build
|
||||
if (
|
||||
process.env.NODE_ENV !== 'development' &&
|
||||
!process.argv.includes('vite:build')
|
||||
) {
|
||||
return {
|
||||
build: {
|
||||
minify: false,
|
||||
target: 'esnext',
|
||||
rollupOptions: {
|
||||
input: './server/prod.mjs',
|
||||
output: {
|
||||
entryFileNames: 'server.js',
|
||||
dir: 'build/headplane',
|
||||
banner: '#!/usr/bin/env node\n',
|
||||
},
|
||||
external: (id) => id.startsWith('node:'),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
PREFIX: JSON.stringify(prefix),
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
stream: 'node:stream',
|
||||
crypto: 'node:crypto',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
base: prefix,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue