SourceMap mode for esbuild.
See also: https://esbuild.github.io/api/#sourcemap
Examplenew 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 DEFAULT Default sourceMap mode - will generate a .js.map file alongside any generated .js file and add a special //# sourceMappingURL= comment to the bottom of the .js file pointing to the .js.map file. EXTERNAL External sourceMap mode - If you want to omit the special //# sourceMappingURL= comment from the generated .js file but you still want to generate the .js.map files. INLINE Inline sourceMap mode - If you want to insert the entire source map into the .js file instead of generating a separate .js.map file. BOTH Both sourceMap mode - If you want to have the effect of both inline and external simultaneously. DEFAULT
Default sourceMap mode - will generate a .js.map file alongside any generated .js file and add a special //# sourceMappingURL= comment to the bottom of the .js file pointing to the .js.map file.
EXTERNALExternal sourceMap mode - If you want to omit the special //# sourceMappingURL= comment from the generated .js file but you still want to generate the .js.map files.
INLINEInline sourceMap mode - If you want to insert the entire source map into the .js file instead of generating a separate .js.map file.
BOTHBoth sourceMap mode - If you want to have the effect of both inline and external simultaneously.
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