OptionalassumptionsSet assumptions in order to produce smaller output.
OptionalcwdThe current working directory. Used to resolve relative paths in other options.
OptionaldecoratorDecorator plugin
OptionaldefineDefine Plugin
Runs after the inject plugin.
OptionalhelpersBehaviour for runtime helpers.
OptionalinjectInject Plugin
Runs after all transforms.
OptionaljsxConfigure how TSX and JSX are transformed.
OptionallangTreat the source text as js, jsx, ts, tsx, or dts.
OptionalpluginsThird-party plugins to use.
OptionalsourcemapEnable source map generation.
When true, the sourceMap field of transform result objects will be populated.
OptionalsourceTreat the source text as script or module code.
OptionaltargetSets the target environment for the generated JavaScript.
The lowest target is es2015.
Example:
'es2015'['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']OptionaltypescriptConfigure how TypeScript is transformed.
typescript.declaration is evaluated before all transforms.
Options for transforming a JavaScript or TypeScript file.
Options are listed in evaluation order: the source is parsed (
lang,sourceType), declarations are emitted (typescript.declaration), then transforms run (typescript,decorator,plugins,jsx,target), followed by theinjectanddefineplugins, and finally codegen (sourcemap).helpersconfigures the runtime helpers the transforms emit.See
transform