Skip to content

Instantly share code, notes, and snippets.

@mxro
Created October 20, 2022 19:57
Show Gist options
  • Save mxro/b09192866a5fb10b9f067d0823fba7ef to your computer and use it in GitHub Desktop.
Save mxro/b09192866a5fb10b9f067d0823fba7ef to your computer and use it in GitHub Desktop.
return {
plugins: [
ignorePlugin({ ignore: ['server'] }),
cssPlugin({
excludeCSSInject: true,
onCSSGenerated: args.onCSSGenerated,
}),
pnpPlugin(),
],
bundle: true,
external: [
'aws-sdk', // included in Lambda runtime environment
],
minify: true,
platform: 'node',
format: 'cjs',
target: 'node16.0',
treeShaking: true,
define: {
'process.env.NODE_ENV': '"production"',
}, // see https://github.com/evanw/esbuild/issues/2377
sourcemap: true,
metafile: false,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment