@jsenv/plugin-commonjs 2.8.29 → 2.9.0
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/package.json
CHANGED
|
@@ -78,17 +78,13 @@ export const jsenvPluginCommonJs = ({
|
|
|
78
78
|
return turnIntoJsModuleProxy(reference);
|
|
79
79
|
},
|
|
80
80
|
fetchUrlContent: async (urlInfo) => {
|
|
81
|
-
const commonJsUrlInfo = urlInfo.getWithoutSearchParam(
|
|
82
|
-
"cjs_as_js_module",
|
|
83
|
-
{
|
|
84
|
-
// during this fetch we don't want to alter the original file
|
|
85
|
-
// so we consider it as text
|
|
86
|
-
expectedType: "text",
|
|
87
|
-
},
|
|
88
|
-
);
|
|
81
|
+
const commonJsUrlInfo = urlInfo.getWithoutSearchParam("cjs_as_js_module");
|
|
89
82
|
if (!commonJsUrlInfo) {
|
|
90
83
|
return null;
|
|
91
84
|
}
|
|
85
|
+
// during this fetch we don't want to alter the original file
|
|
86
|
+
// so we consider it as text
|
|
87
|
+
commonJsUrlInfo.type = "text";
|
|
92
88
|
await commonJsUrlInfo.cook();
|
|
93
89
|
const nodeRuntimeEnabled = Object.keys(
|
|
94
90
|
urlInfo.context.runtimeCompat,
|