Fabio Ospitia Trujillo

Results 3 comments of Fabio Ospitia Trujillo

For AWS Lambda with serverless-esbuild plugin this config work for me ```yaml esbuild: minify: true platform: node target: esnext sourcemap: true sourcesContent: false format: esm outExtension: .js: .mjs banner: js:...

@ShivamJoker the cause of the bug is that function 'require' not exists in an ES module of nodejs. The banner option add the 'require' function at the beginning of generated...

This work for me: ```js const buildOptions: BuildOptions = { ...common, format: "esm", target: "esnext", platform: "node", banner: 'import { createRequire } from 'module';const require = createRequire(import.meta.url);', bundle, }; esbuild(buildOptions);`