@stacksjs/stx 0.2.179 → 0.2.181

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,6 +1,7 @@
1
1
  import path from "node:path";
2
2
  import { getPublicEnvDefine } from "./public-env.js";
3
3
  import { SERVER_ONLY_COMPOSABLES } from "./unresolved-identifiers.js";
4
+ import { getSharedTranspiler } from "./utils.js";
4
5
  const _cache = new Map, RUNTIME_OWNED = new Set, SERVER_ONLY = new Set(SERVER_ONLY_COMPOSABLES);
5
6
  export function clearFrameworkComposableCache() {
6
7
  _cache.clear();
@@ -47,7 +48,7 @@ export async function getFrameworkComposableScript(source, composablesDir) {
47
48
  const dir = composablesDir ?? path.join(import.meta.dir, "composables"), key = `${dir}\x00${names.join(",")}`, cached = _cache.get(key);
48
49
  if (cached !== void 0)
49
50
  return cached || null;
50
- const transpiler = new Bun.Transpiler({ loader: "ts", target: "browser", define: getPublicEnvDefine() }), wanted = new Set(names), chunks = [], emitted = new Set;
51
+ const transpiler = getSharedTranspiler({ loader: "ts", target: "browser", define: getPublicEnvDefine() }), wanted = new Set(names), chunks = [], emitted = new Set;
51
52
  let files = [];
52
53
  try {
53
54
  const glob = new Bun.Glob("*.{ts,js}");