You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calendar-optimizer-inferno/build.mjs

23 lines
442 B
JavaScript

import * as esbuild from 'esbuild'
const config = {
entryPoints: ['src/index.tsx'],
bundle: true,
outdir: 'dist',
platform: 'browser',
format: 'esm',
external: ['fsevents'],
};
if(process.argv[2] === 'serve'){
const context = await esbuild.context(config);
const {host, port} = await context.serve({
servedir: 'dist'
});
console.log(`Listening on http://${host}:${port}/`);
}
else{
await esbuild.build(config);
}