A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs.OutputFormat.html below:

enum OutputFormat · AWS CDK

enum OutputFormat

Output format for the generated JavaScript files.

Example
new nodejs.NodejsFunction(this, 'my-handler', {
  bundling: {
    minify: true, 
    sourceMap: true, 
    sourceMapMode: nodejs.SourceMapMode.INLINE, 
    sourcesContent: false, 
    target: 'es2020', 
    loader: { 
      '.png': 'dataurl',
    },
    define: { 
      'process.env.API_KEY': JSON.stringify('xxx-xxxx-xxx'),
      'process.env.PRODUCTION': JSON.stringify(true),
      'process.env.NUMBER': JSON.stringify(123),
    },
    logLevel: nodejs.LogLevel.ERROR, 
    keepNames: true, 
    tsconfig: 'custom-tsconfig.json', 
    metafile: true, 
    banner: '/* comments */', 
    footer: '/* comments */', 
    charset: nodejs.Charset.UTF8, 
    format: nodejs.OutputFormat.ESM, 
    mainFields: ['module', 'main'], 
    inject: ['./my-shim.js', './other-shim.js'], 
    esbuildArgs: { 
      "--log-limit": "0",
      "--splitting": true,
    },
  },
});
Members Name Description CJS CommonJS. ESM ECMAScript module. CJS

CommonJS.

ESM

ECMAScript module.

Requires a running environment that supports import and export syntax.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4