@jsenv/js-module-fallback 1.6.0 → 1.6.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyBabelPlugins, babelPluginAsyncToPromises } from "@jsenv/ast";
|
|
2
|
-
import { composeTwoSourcemaps } from "@jsenv/sourcemap";
|
|
2
|
+
import { SOURCEMAP, composeTwoSourcemaps } from "@jsenv/sourcemap";
|
|
3
3
|
import { urlToRelativeUrl } from "@jsenv/urls";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { parseExpression } from "@babel/parser";
|
|
@@ -160,7 +160,13 @@ const convertJsModuleToJsClassic = async ({
|
|
|
160
160
|
require$1("@babel/plugin-transform-modules-umd"),
|
|
161
161
|
]),
|
|
162
162
|
],
|
|
163
|
-
|
|
163
|
+
// the sourcemap is passed as "inputSourcemap"; a "sourceMappingURL" comment
|
|
164
|
+
// left in the content names the file produced by the previous step and would
|
|
165
|
+
// send babel looking for that ".map" next to "inputUrl"
|
|
166
|
+
input: SOURCEMAP.removeComment({
|
|
167
|
+
contentType: "text/javascript",
|
|
168
|
+
content: input,
|
|
169
|
+
}),
|
|
164
170
|
inputIsJsModule: true,
|
|
165
171
|
inputUrl,
|
|
166
172
|
outputUrl,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyBabelPlugins, babelPluginAsyncToPromises } from "@jsenv/ast";
|
|
2
|
-
import { composeTwoSourcemaps } from "@jsenv/sourcemap";
|
|
2
|
+
import { composeTwoSourcemaps, SOURCEMAP } from "@jsenv/sourcemap";
|
|
3
3
|
import { urlToRelativeUrl } from "@jsenv/urls";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
|
|
@@ -90,7 +90,13 @@ export const convertJsModuleToJsClassic = async ({
|
|
|
90
90
|
require("@babel/plugin-transform-modules-umd"),
|
|
91
91
|
]),
|
|
92
92
|
],
|
|
93
|
-
|
|
93
|
+
// the sourcemap is passed as "inputSourcemap"; a "sourceMappingURL" comment
|
|
94
|
+
// left in the content names the file produced by the previous step and would
|
|
95
|
+
// send babel looking for that ".map" next to "inputUrl"
|
|
96
|
+
input: SOURCEMAP.removeComment({
|
|
97
|
+
contentType: "text/javascript",
|
|
98
|
+
content: input,
|
|
99
|
+
}),
|
|
94
100
|
inputIsJsModule: true,
|
|
95
101
|
inputUrl,
|
|
96
102
|
outputUrl,
|