LinbuduLab / esbuild-plugins

ESBuild plugins by @LinbuduLab
MIT License
113 stars 18 forks source link

Transpile then copy? #102

Open pthieu opened 1 year ago

pthieu commented 1 year ago

I would like to transpile my TS files into JS and then use the copy plugin to copy it over to the output folder.

Currently the copy works well, I have the current build step config

await build({
  entryPoints: ['src/index.ts'],
  bundle: true,
  minify: true,
  platform: 'node',
  outfile: 'dist/app.js',
  plugins: [
    copy({
      resolveFrom: 'cwd',
      assets: {
        from: ['./src/db/migrations/*'],
        to: ['./dist/db/migrations/'],
      },
      watch: true,
    }),
  ],
});

I'm looking for a way to add the transpile step on top.

pthieu commented 1 year ago

Nevermind, I added a 2nd build step