unplugin-isolated-decl 0.10.1 → 0.10.2
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/esbuild.cjs +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/farm.cjs +1 -1
- package/dist/farm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.js +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.js +1 -1
- package/dist/{src-hAmGUUg5.js → src-Yy6QF_tM.js} +7 -3
- package/dist/{src-BlDD5o16.cjs → src-h7U2Vqcv.cjs} +7 -3
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/package.json +1 -1
package/dist/esbuild.cjs
CHANGED
package/dist/esbuild.js
CHANGED
package/dist/farm.cjs
CHANGED
package/dist/farm.js
CHANGED
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/dist/rolldown.cjs
CHANGED
package/dist/rolldown.js
CHANGED
package/dist/rollup.cjs
CHANGED
package/dist/rollup.js
CHANGED
|
@@ -113,7 +113,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
113
113
|
const options = resolveOptions(rawOptions);
|
|
114
114
|
const filter = createFilter(options.include, options.exclude);
|
|
115
115
|
let farmPluginContext;
|
|
116
|
-
|
|
116
|
+
let outputFiles = Object.create(null);
|
|
117
117
|
function addOutput(filename, output) {
|
|
118
118
|
const name = stripExt(filename);
|
|
119
119
|
const ext = path.extname(filename);
|
|
@@ -129,6 +129,7 @@ const IsolatedDecl = createUnplugin((rawOptions = {}) => {
|
|
|
129
129
|
name: "unplugin-isolated-decl",
|
|
130
130
|
buildStart() {
|
|
131
131
|
farmPluginContext = this;
|
|
132
|
+
outputFiles = Object.create(null);
|
|
132
133
|
},
|
|
133
134
|
transformInclude: (id) => filter(id),
|
|
134
135
|
transform(code, id) {
|
|
@@ -223,18 +224,21 @@ else {
|
|
|
223
224
|
if (options.patchCjsDefaultExport && emitName.endsWith(".d.cts")) source = patchCjsDefaultExport(source);
|
|
224
225
|
if (options.extraOutdir) emitName = path.join(options.extraOutdir || "", emitName);
|
|
225
226
|
debug("[rollup] emit dts file:", emitName);
|
|
227
|
+
const originalFileName = srcFilename + ext;
|
|
226
228
|
if (options.sourceMap && map && outDir) {
|
|
227
229
|
source = appendMapUrl(source, emitName);
|
|
228
230
|
this.emitFile({
|
|
229
231
|
type: "asset",
|
|
230
232
|
fileName: `${emitName}.map`,
|
|
231
|
-
source: generateDtsMap(map,
|
|
233
|
+
source: generateDtsMap(map, originalFileName, path.join(outDir, emitName)),
|
|
234
|
+
originalFileName
|
|
232
235
|
});
|
|
233
236
|
}
|
|
234
237
|
this.emitFile({
|
|
235
238
|
type: "asset",
|
|
236
239
|
fileName: emitName,
|
|
237
|
-
source
|
|
240
|
+
source,
|
|
241
|
+
originalFileName
|
|
238
242
|
});
|
|
239
243
|
}
|
|
240
244
|
}
|
|
@@ -114,7 +114,7 @@ const IsolatedDecl = (0, unplugin.createUnplugin)((rawOptions = {}) => {
|
|
|
114
114
|
const options = resolveOptions(rawOptions);
|
|
115
115
|
const filter = (0, __rollup_pluginutils.createFilter)(options.include, options.exclude);
|
|
116
116
|
let farmPluginContext;
|
|
117
|
-
|
|
117
|
+
let outputFiles = Object.create(null);
|
|
118
118
|
function addOutput(filename, output) {
|
|
119
119
|
const name = stripExt(filename);
|
|
120
120
|
const ext = node_path.default.extname(filename);
|
|
@@ -130,6 +130,7 @@ const IsolatedDecl = (0, unplugin.createUnplugin)((rawOptions = {}) => {
|
|
|
130
130
|
name: "unplugin-isolated-decl",
|
|
131
131
|
buildStart() {
|
|
132
132
|
farmPluginContext = this;
|
|
133
|
+
outputFiles = Object.create(null);
|
|
133
134
|
},
|
|
134
135
|
transformInclude: (id) => filter(id),
|
|
135
136
|
transform(code, id) {
|
|
@@ -224,18 +225,21 @@ else {
|
|
|
224
225
|
if (options.patchCjsDefaultExport && emitName.endsWith(".d.cts")) source = patchCjsDefaultExport(source);
|
|
225
226
|
if (options.extraOutdir) emitName = node_path.default.join(options.extraOutdir || "", emitName);
|
|
226
227
|
debug$1("[rollup] emit dts file:", emitName);
|
|
228
|
+
const originalFileName = srcFilename + ext;
|
|
227
229
|
if (options.sourceMap && map && outDir) {
|
|
228
230
|
source = require_transformer.appendMapUrl(source, emitName);
|
|
229
231
|
this.emitFile({
|
|
230
232
|
type: "asset",
|
|
231
233
|
fileName: `${emitName}.map`,
|
|
232
|
-
source: require_transformer.generateDtsMap(map,
|
|
234
|
+
source: require_transformer.generateDtsMap(map, originalFileName, node_path.default.join(outDir, emitName)),
|
|
235
|
+
originalFileName
|
|
233
236
|
});
|
|
234
237
|
}
|
|
235
238
|
this.emitFile({
|
|
236
239
|
type: "asset",
|
|
237
240
|
fileName: emitName,
|
|
238
|
-
source
|
|
241
|
+
source,
|
|
242
|
+
originalFileName
|
|
239
243
|
});
|
|
240
244
|
}
|
|
241
245
|
}
|
package/dist/vite.cjs
CHANGED
package/dist/vite.js
CHANGED