unplugin-isolated-decl 0.8.0 → 0.8.1
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-CLCa83Ij.js → src-BiFhTk02.js} +8 -8
- package/dist/{src-BpqQm19o.cjs → src-D3Z1XJCx.cjs} +8 -8
- 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
|
@@ -59,7 +59,7 @@ function rewriteImports(s, imports, entryMap, inputBase, entryFileNames, srcFile
|
|
|
59
59
|
const offset = path$1.relative(emitDir, srcDirRel);
|
|
60
60
|
for (const i of imports) {
|
|
61
61
|
const { source } = i;
|
|
62
|
-
const
|
|
62
|
+
const srcIdRel = stripExt(source.value);
|
|
63
63
|
if (srcIdRel[0] !== ".") continue;
|
|
64
64
|
const srcId = path$1.resolve(srcDir, srcIdRel);
|
|
65
65
|
const importAlias = entryMap?.[srcId];
|
|
@@ -157,19 +157,19 @@ else {
|
|
|
157
157
|
const s = new MagicString(dts);
|
|
158
158
|
if (options.autoAddExts || options.rewriteImports) for (const i of imports) {
|
|
159
159
|
const { source } = i;
|
|
160
|
-
|
|
161
|
-
if (options.autoAddExts && (path.isAbsolute(value) || value[0] === ".") && !path.basename(value).includes(".")) {
|
|
162
|
-
const resolved = await resolve(context, value, id);
|
|
163
|
-
if (!resolved || resolved.external) continue;
|
|
164
|
-
if (resolved.id.endsWith(".ts") || resolved.id.endsWith(".tsx")) i.suffix = ".js";
|
|
165
|
-
}
|
|
160
|
+
let { value } = source;
|
|
166
161
|
if (options.rewriteImports) {
|
|
167
162
|
const result$1 = options.rewriteImports(value, id);
|
|
168
163
|
if (typeof result$1 === "string") {
|
|
169
|
-
source.value = result$1;
|
|
164
|
+
source.value = value = result$1;
|
|
170
165
|
s.overwrite(source.start + 1, source.end - 1, result$1);
|
|
171
166
|
}
|
|
172
167
|
}
|
|
168
|
+
if (options.autoAddExts && (path.isAbsolute(value) || value[0] === ".")) {
|
|
169
|
+
const resolved = await resolve(context, value, stripExt(id));
|
|
170
|
+
if (!resolved || resolved.external) continue;
|
|
171
|
+
if (resolved.id.endsWith(".ts") || resolved.id.endsWith(".tsx")) i.suffix = ".js";
|
|
172
|
+
}
|
|
173
173
|
}
|
|
174
174
|
addOutput(id, {
|
|
175
175
|
s,
|
|
@@ -83,7 +83,7 @@ function rewriteImports(s, imports, entryMap, inputBase, entryFileNames, srcFile
|
|
|
83
83
|
const offset = node_path.default.relative(emitDir, srcDirRel);
|
|
84
84
|
for (const i of imports) {
|
|
85
85
|
const { source } = i;
|
|
86
|
-
const
|
|
86
|
+
const srcIdRel = stripExt(source.value);
|
|
87
87
|
if (srcIdRel[0] !== ".") continue;
|
|
88
88
|
const srcId = node_path.default.resolve(srcDir, srcIdRel);
|
|
89
89
|
const importAlias = entryMap?.[srcId];
|
|
@@ -181,19 +181,19 @@ else {
|
|
|
181
181
|
const s = new magic_string.default(dts);
|
|
182
182
|
if (options.autoAddExts || options.rewriteImports) for (const i of imports) {
|
|
183
183
|
const { source } = i;
|
|
184
|
-
|
|
185
|
-
if (options.autoAddExts && (node_path.default.isAbsolute(value) || value[0] === ".") && !node_path.default.basename(value).includes(".")) {
|
|
186
|
-
const resolved = await resolve(context, value, id);
|
|
187
|
-
if (!resolved || resolved.external) continue;
|
|
188
|
-
if (resolved.id.endsWith(".ts") || resolved.id.endsWith(".tsx")) i.suffix = ".js";
|
|
189
|
-
}
|
|
184
|
+
let { value } = source;
|
|
190
185
|
if (options.rewriteImports) {
|
|
191
186
|
const result$1 = options.rewriteImports(value, id);
|
|
192
187
|
if (typeof result$1 === "string") {
|
|
193
|
-
source.value = result$1;
|
|
188
|
+
source.value = value = result$1;
|
|
194
189
|
s.overwrite(source.start + 1, source.end - 1, result$1);
|
|
195
190
|
}
|
|
196
191
|
}
|
|
192
|
+
if (options.autoAddExts && (node_path.default.isAbsolute(value) || value[0] === ".")) {
|
|
193
|
+
const resolved = await resolve(context, value, stripExt(id));
|
|
194
|
+
if (!resolved || resolved.external) continue;
|
|
195
|
+
if (resolved.id.endsWith(".ts") || resolved.id.endsWith(".tsx")) i.suffix = ".js";
|
|
196
|
+
}
|
|
197
197
|
}
|
|
198
198
|
addOutput(id, {
|
|
199
199
|
s,
|
package/dist/vite.cjs
CHANGED
package/dist/vite.js
CHANGED