Skip to content

Commit a850589

Browse files
committed
fix: patch jspm
1 parent 1ed25fb commit a850589

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

patches/@jspm+generator+2.6.2.patch

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@jspm/generator/dist/generator-c35f6b68.js b/node_modules/@jspm/generator/dist/generator-c35f6b68.js
2-
index 58dba40..c41f755 100644
2+
index 58dba40..845639f 100644
33
--- a/node_modules/@jspm/generator/dist/generator-c35f6b68.js
44
+++ b/node_modules/@jspm/generator/dist/generator-c35f6b68.js
55
@@ -3154,6 +3154,7 @@ provider) {
@@ -38,3 +38,12 @@ index 58dba40..c41f755 100644
3838
try {
3939
var entry = await this.resolver.analyze(resolved);
4040
} catch (e) {
41+
@@ -4939,7 +4943,7 @@ function createFetchOptions(cache = true, fetchOptions = {}) {
42+
replacer.remove(existingComment.start, existingComment.end, true);
43+
}
44+
}
45+
- replacer.replace(analysis.map.start, analysis.map.end, (comment ? '<!--' + comment + '-->' + newlineTab : '') + esms + '<script type="importmap">' + (whitespace ? newlineTab : '') + JSON.stringify(map, null, whitespace ? 2 : 0).replace(/\n/g, newlineTab) + (whitespace ? newlineTab : '') + '</script>' + preloads + (analysis.map.newScript ? newlineTab : ''));
46+
+ replacer.replace(analysis.map.start, analysis.map.end, (comment ? '<!--' + comment + '-->' + newlineTab : '') + esms + '<script type="importmap">' + (whitespace ? newlineTab : '') + (JSON.stringify(map, null, whitespace ? 2 : 0)?.replace(/\n/g, newlineTab) ?? '') + (whitespace ? newlineTab : '') + '</script>' + preloads + (analysis.map.newScript ? newlineTab : ''));
47+
return replacer.source;
48+
}
49+
async install(install, mode) {

0 commit comments

Comments
 (0)