Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

@rescript/runtime dependency problems

$
0
0

With some hackery you can keep using hoisted:

in your vite.config.js add:

// Resolve @rescript/runtime using Bun's module resolution
const rootPath = path.resolve(import.meta.dirname, "../.."); // rootPath because this config lives in a package subfolder
const rescriptPackage = path.dirname(Bun.resolveSync("rescript/package.json", rootPath));
const runtimePackage = path.dirname(Bun.resolveSync("@rescript/runtime/package.json", rescriptPackage));

// later in the config:
export default defineConfig({
  resolve: {
      alias: {
        "@rescript/runtime": runtimePackage,
      },
    }
})

not ideal I admit.


Viewing all articles
Browse latest Browse all 2592

Trending Articles