Serpack
Apis
Compiler Options
Compiler Options
#nodeExternal
- Description: Excludes
node_modules
from the output. - Default:
false
TIP
Refer Exclude node_modules.#externals
- Description: Specifies modules to exclude from the output.
- Default:
[]
.serpackrc.ts
export default <import('serpack').Options>{
compilerOptions: {
nodeExternal: false,
externals: ['serpack'],
},
};
#runtime
- Description: Enables runtime functionality, which reduces output size.
- Default:
false
.serpackrc.ts
export default <import('serpack').Options>{
compilerOptions: {
runtime: true,
},
};
TIP
Refer serpack/runtime.#parserOptions
- Description: Configuration options for the Acorn parser.
- Default:
{}
#globals
- Description: Settings for global variables -
swc.jsc.transform.optimizer.globals
. - Default: (No default specified)
#resolverOptions
- Description: Options for the
oxc-resolver
. - Default:
{}
#type
- Description: Specifies the type of the script, either
script
ormodule
. - Default:
"module"
#banner
- Description: Adds a banner at the top of the output file.
- Default:
""
#footer
- Description: Adds a footer at the bottom of the output file.
- Default:
""