fix(bundling): add skipTypeField back for rollup executor (#17629)
This commit is contained in:
parent
1e8de7a00e
commit
162b144467
@ -169,6 +169,11 @@
|
||||
"type": "boolean",
|
||||
"description": "Whether to skip TypeScript type checking.",
|
||||
"default": false
|
||||
},
|
||||
"skipTypeField": {
|
||||
"type": "boolean",
|
||||
"description": "Prevents 'type' field from being added to compiled package.json file. Use this if you are having an issue with this field.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["tsConfig", "main", "outputPath"],
|
||||
|
||||
@ -45,8 +45,9 @@ export function updatePackageJson(
|
||||
packageJson.main = './index.cjs';
|
||||
exports['.']['require'] = './index.cjs';
|
||||
}
|
||||
|
||||
if (!options.skipTypeField) {
|
||||
packageJson.type = options.format.includes('esm') ? 'module' : 'commonjs';
|
||||
}
|
||||
|
||||
// Support for older TS versions < 4.5
|
||||
packageJson.types = types;
|
||||
|
||||
@ -33,4 +33,5 @@ export interface RollupExecutorOptions {
|
||||
generateExportsField?: boolean;
|
||||
skipTypeCheck?: boolean;
|
||||
babelUpwardRootMode?: boolean;
|
||||
skipTypeField?: boolean;
|
||||
}
|
||||
|
||||
@ -156,6 +156,11 @@
|
||||
"type": "boolean",
|
||||
"description": "Whether to skip TypeScript type checking.",
|
||||
"default": false
|
||||
},
|
||||
"skipTypeField": {
|
||||
"type": "boolean",
|
||||
"description": "Prevents 'type' field from being added to compiled package.json file. Use this if you are having an issue with this field.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["tsConfig", "main", "outputPath"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user