@embeddable.com/sdk-core 4.1.11-next.1 → 4.1.12-next.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/loader/custom-esm-loader.mjs +21 -1
- package/package.json +1 -1
- package/src/.editorconfig +0 -0
|
@@ -150,7 +150,27 @@ export const resolve = async (specifier, context, nextResolve) => {
|
|
|
150
150
|
(context.parentURL?.includes("/node_modules/") || isPackageImport) &&
|
|
151
151
|
!isTS
|
|
152
152
|
) {
|
|
153
|
-
|
|
153
|
+
try {
|
|
154
|
+
return await nextResolve(specifier);
|
|
155
|
+
} catch (err) {
|
|
156
|
+
if (
|
|
157
|
+
!path.extname(specifier) &&
|
|
158
|
+
(err.code === "ERR_MODULE_NOT_FOUND" ||
|
|
159
|
+
err.code === "ERR_UNSUPPORTED_DIR_IMPORT")
|
|
160
|
+
) {
|
|
161
|
+
try {
|
|
162
|
+
return await nextResolve(specifier + ".js");
|
|
163
|
+
} catch {
|
|
164
|
+
// fall through
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
return await nextResolve(specifier + "/index.js");
|
|
168
|
+
} catch {
|
|
169
|
+
// fall through
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
throw err;
|
|
173
|
+
}
|
|
154
174
|
}
|
|
155
175
|
|
|
156
176
|
const isFileUrl = specifier.startsWith("file://");
|
package/package.json
CHANGED
|
File without changes
|