From c3bfb3e6c57afd7d1b8de76ed7495e9e1de5aa31 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 1 Jan 2023 12:57:21 -0500 Subject: [PATCH] *Since ESM imports will get rewritten import loady as ESM so it can be processed when importing ESM files --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index a2a3922..122045a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,8 +12,8 @@ import type { Plugin } from "vite"; import path from "path"; const loaderFunction = ` +import loady from "loady"; function loadNativeModuleTemp (module, data) { - const loady = require("loady"); const tempDir = require("os").tmpdir(); const fs = require("fs"); const path = require("path");