3 const esbuild = require('esbuild');
4 const path = require('path');
6 // Check if we're building for production
7 // (Set via passing `production` as first argument)
8 const isProd = process.argv[2] === 'production';
10 // Gather our input files
12 app: path.join(__dirname, '../../resources/js/app.js'),
13 code: path.join(__dirname, '../../resources/js/code/index.mjs'),
16 // Locate our output directory
17 const outdir = path.join(__dirname, '../../public/dist');
26 mainFields: ['module', 'main'],
30 }).catch(() => process.exit(1));