Created
October 20, 2022 19:57
-
-
Save mxro/b09192866a5fb10b9f067d0823fba7ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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