From 58143a9f2be3c5c51985a77ef2dc16df56b4e3f1 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 1 Jan 2023 14:23:48 -0500 Subject: [PATCH] *Using ESM import has bad side effects, switch to const since using "transformMixedEsModules" makes it compatible --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 23c3dfd..bdbf0df 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ import type { Plugin } from "vite"; import path from "path"; const loaderFunction = ` -import loady from "loady"; +const loady = require("loady"); function loadNativeModuleTemp (module, data) { const tempDir = require("os").tmpdir(); const fs = require("fs");