Files
Hanzo AI 4d27919a09 feat: rebrand all packages to @hanzo/cms scope (Payload v3.85.2 fork)
- payload -> @hanzo/cms (core), bin payload -> hanzo-cms
- create-payload-app -> @hanzo/create-cms-app
- @payloadcms/<x> -> @hanzo/cms-<x> across the whole dependency graph
- 3545 files, 72 package.json, 4419 scoped refs, 3852 core import specifiers, 82 scss imports
- MIT attribution to Payload CMS Inc. preserved (LICENSE.md, author emails)

Upstream: github.com/payloadcms/payload @ v3.85.2 (MIT)
2026-07-01 17:56:00 -07:00

35 lines
1.0 KiB
JavaScript

import * as esbuild from 'esbuild'
import fs from 'fs'
import { sassPlugin } from 'esbuild-sass-plugin'
import path from 'path'
import { fileURLToPath } from 'url'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
const directoryArg = process.argv[2] || 'dist'
async function build() {
const resultIndex = await esbuild.build({
entryPoints: ['dist/esbuildEntry.js'],
bundle: true,
platform: 'node',
format: 'esm',
outfile: `${directoryArg}/index.js`,
splitting: false,
external: ['@hanzo/cms-ui', 'payload', '@hanzo/cms-translations', '@hanzo/cms-graphql'],
minify: true,
metafile: true,
tsconfig: path.resolve(dirname, './tsconfig.json'),
// plugins: [commonjs()],
sourcemap: true,
plugins: [sassPlugin({ css: 'external' })],
// 18.20.2 is the lowest version of node supported by Payload
target: 'node18.20.2',
})
console.log('payload server bundled successfully')
fs.writeFileSync('meta_index.json', JSON.stringify(resultIndex.metafile))
}
await build()