@embeddable.com/sdk-core 3.1.0 → 3.1.2-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.
@@ -28,7 +28,8 @@ const host = {
28
28
  readFile: ts.sys.readFile,
29
29
  };
30
30
  const EXTENSIONS = [ts.Extension.Ts, ts.Extension.Tsx, ts.Extension.Mts];
31
- const NON_JS_TS_EXTENSIONS = /\.(css|scss|less|sass|styl|json|svg)$/;
31
+ const NON_JS_TS_EXTENSIONS =
32
+ /\.(css|scss|less|sass|styl|json|svg|woff|woff2|png|jpg|jpeg|gif|webp|md|yml|yaml)$/;
32
33
 
33
34
  const currentDir = dirname(fileURLToPath(import.meta.url));
34
35
 
@@ -44,7 +45,9 @@ export const resolve = async (specifier, context, nextResolve) => {
44
45
  shortCircuit: true,
45
46
  };
46
47
  }
48
+
47
49
  const isTS = EXTENSIONS.some((ext) => specifier.endsWith(ext));
50
+
48
51
  // entrypoint
49
52
  if (!context.parentURL) {
50
53
  return {
@@ -57,8 +60,11 @@ export const resolve = async (specifier, context, nextResolve) => {
57
60
  if (context.parentURL.includes("/node_modules/") && !isTS) {
58
61
  return nextResolve(specifier);
59
62
  }
63
+
64
+ const isFileUrl = specifier.startsWith("file:");
65
+
60
66
  const { resolvedModule } = ts.resolveModuleName(
61
- specifier,
67
+ isFileUrl ? fileURLToPath(specifier) : specifier,
62
68
  fileURLToPath(context.parentURL),
63
69
  tsconfig,
64
70
  host,
@@ -72,7 +78,9 @@ export const resolve = async (specifier, context, nextResolve) => {
72
78
  ) {
73
79
  return {
74
80
  format: "ts",
75
- url: pathToFileURL(resolvedModule.resolvedFileName).href,
81
+ url:
82
+ pathToFileURL(resolvedModule.resolvedFileName).href +
83
+ `?update=${Date.now()}`,
76
84
  shortCircuit: true,
77
85
  };
78
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddable.com/sdk-core",
3
- "version": "3.1.0",
3
+ "version": "3.1.2-next.0",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",