aboutsummaryrefslogtreecommitdiff
path: root/vnext/serve.js
blob: 7638c070df1d8f02ee43a25e128701f549f4a6ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const esbuild = require('esbuild');

esbuild
  .serve(
    {
      servedir: 'public',
      port: 8000,
    },
    {
      entryPoints: ['./src/index.js'],
      outfile: './public/index.js',
      bundle: true,
      loader: {
        '.js': 'jsx',
        '.png': 'file',
        '.svg': 'file'
      }
    }
  )
  .catch(() => process.exit());