feat(vite): allow setting of build target (#16588)
This commit is contained in:
parent
cab7aacc55
commit
44654251bd
@ -58,6 +58,10 @@
|
||||
"description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
|
||||
},
|
||||
"target": {
|
||||
"description": "Browser compatibility target for the final bundle. For more info: https://vitejs.dev/config/build-options.html#build-target",
|
||||
"type": "string"
|
||||
},
|
||||
"minify": {
|
||||
"description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
|
||||
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
|
||||
|
||||
@ -14,4 +14,5 @@ export interface ViteBuildExecutorOptions {
|
||||
mode?: string;
|
||||
ssr?: boolean | string;
|
||||
watch?: object | boolean;
|
||||
target?: string | string[];
|
||||
}
|
||||
|
||||
@ -67,6 +67,10 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"description": "Browser compatibility target for the final bundle. For more info: https://vitejs.dev/config/build-options.html#build-target",
|
||||
"type": "string"
|
||||
},
|
||||
"minify": {
|
||||
"description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
|
||||
"oneOf": [
|
||||
|
||||
@ -139,7 +139,7 @@ export function getViteBuildOptions(
|
||||
emptyOutDir: options.emptyOutDir,
|
||||
reportCompressedSize: true,
|
||||
cssCodeSplit: true,
|
||||
target: 'esnext',
|
||||
target: options.target ?? 'esnext',
|
||||
commonjsOptions: {
|
||||
transformMixedEsModules: true,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user