@sanity/pkg-utils 7.8.6 → 7.8.8-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/index.cjs +16 -12
- package/dist/_chunks-cjs/index.cjs.map +1 -1
- package/dist/_chunks-es/index.js +16 -12
- package/dist/_chunks-es/index.js.map +1 -1
- package/dist/cli.js +1 -1
- package/package.json +3 -3
|
@@ -775,23 +775,27 @@ function createApiExtractorConfig(options) {
|
|
|
775
775
|
tsconfig,
|
|
776
776
|
tsconfigPath,
|
|
777
777
|
dtsRollupEnabled
|
|
778
|
-
} = options
|
|
779
|
-
|
|
778
|
+
} = options, workaroundModulePreserve = tsconfig.options.module === ts__default.default.ModuleKind.Preserve, workaroundPaths = !!tsconfig.options.paths, overrideTsconfig = {
|
|
779
|
+
extends: tsconfigPath,
|
|
780
|
+
compilerOptions: {}
|
|
781
|
+
};
|
|
782
|
+
return workaroundModulePreserve && Object.assign(overrideTsconfig.compilerOptions, {
|
|
783
|
+
// Set the equivalent options to `module: 'Preserve'`
|
|
784
|
+
// https://github.com/microsoft/TypeScript/pull/56785/files?file-filters%5B%5D=.js&file-filters%5B%5D=.json&file-filters%5B%5D=.symbols&file-filters%5B%5D=.ts&file-filters%5B%5D=.types&show-viewed-files=true#diff-31d3c12bafea26bc9e8c8a77920c41af0c593206442add70c45a06c063767445
|
|
785
|
+
module: "ESNext",
|
|
786
|
+
moduleResolution: "Bundler",
|
|
787
|
+
esModuleInterop: !0,
|
|
788
|
+
resolveJsonModule: !0
|
|
789
|
+
}), workaroundPaths && Object.assign(overrideTsconfig.compilerOptions, {
|
|
790
|
+
// An empty object replaces whatever is in the original tsconfig file
|
|
791
|
+
paths: {}
|
|
792
|
+
}), {
|
|
780
793
|
apiReport: {
|
|
781
794
|
enabled: !1,
|
|
782
795
|
reportFileName: "<unscopedPackageName>.api.md"
|
|
783
796
|
},
|
|
784
797
|
bundledPackages,
|
|
785
|
-
|
|
786
|
-
compiler: tsconfig.options.paths ? {
|
|
787
|
-
overrideTsconfig: {
|
|
788
|
-
extends: tsconfigPath,
|
|
789
|
-
compilerOptions: {
|
|
790
|
-
// An empty object replaces whatever is in the original tsconfig file
|
|
791
|
-
paths: {}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
} : { tsconfigFilePath: tsconfigPath },
|
|
798
|
+
compiler: workaroundModulePreserve || workaroundPaths ? { overrideTsconfig } : { tsconfigFilePath: tsconfigPath },
|
|
795
799
|
docModel: {
|
|
796
800
|
enabled: !1,
|
|
797
801
|
apiJsonFilePath: path__default.default.resolve(distPath, `${exportPath}.api.json`)
|