mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
15 lines
450 B
JavaScript
15 lines
450 B
JavaScript
const esbuild = require('esbuild')
|
|
const shouldWatch = process.argv.includes('--watch')
|
|
|
|
esbuild.build({
|
|
define: {
|
|
'process.env.NODE_ENV': shouldWatch ? `'production'` : `'development'`,
|
|
},
|
|
entryPoints: ['packages/forms/resources/js/index.js'],
|
|
outfile: 'packages/forms/dist/module.esm.js',
|
|
bundle: true,
|
|
platform: 'neutral',
|
|
mainFields: ['module', 'main'],
|
|
watch: shouldWatch,
|
|
}).catch(() => process.exit(1))
|