ts-swc-transform 2.6.15 → 2.6.17
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.
|
@@ -123,7 +123,7 @@ function transformTypesWorker(src, dest, options, callback) {
|
|
|
123
123
|
// TODO: remove patch for https://github.com/microsoft/TypeScript/issues/61037
|
|
124
124
|
if (res.emittedFiles && compilerOptions.options.rewriteRelativeImportExtensions) {
|
|
125
125
|
res.emittedFiles.forEach(function(file) {
|
|
126
|
-
if (file.endsWith('.d.
|
|
126
|
+
if (file.endsWith('.d.js') || file.endsWith('.d.cjs') || file.endsWith('.d.mjs')) {
|
|
127
127
|
try {
|
|
128
128
|
var content = _fs.default.readFileSync(file, 'utf8');
|
|
129
129
|
var updated = (0, _rewriteExtensionsts.rewriteExtensions)(content);
|
|
@@ -55,7 +55,7 @@ export default function transformTypesWorker(src, dest, options, callback) {
|
|
|
55
55
|
// TODO: remove patch for https://github.com/microsoft/TypeScript/issues/61037
|
|
56
56
|
if (res.emittedFiles && compilerOptions.options.rewriteRelativeImportExtensions) {
|
|
57
57
|
res.emittedFiles.forEach((file)=>{
|
|
58
|
-
if (file.endsWith('.d.
|
|
58
|
+
if (file.endsWith('.d.js') || file.endsWith('.d.cjs') || file.endsWith('.d.mjs')) {
|
|
59
59
|
try {
|
|
60
60
|
const content = fs.readFileSync(file, 'utf8');
|
|
61
61
|
const updated = rewriteExtensions(content);
|