From 3687f1fd4aa012ed4213561548c881f241422ee9 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 2 Aug 2021 17:00:40 -0700 Subject: [PATCH] Copy instead of symlinking since it seems snowpack can't pick up symlinks --- scripts/post-install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/post-install.js b/scripts/post-install.js index fe8743b6..63e0abfc 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -75,7 +75,7 @@ async function populateLib() { const olmDstDir = path.join(libDir, "olm/"); await fs.mkdir(olmDstDir); for (const file of ["olm.js", "olm.wasm", "olm_legacy.js"]) { - await fs.symlink(path.join(olmSrcDir, file), path.join(olmDstDir, file)); + await fs.copyFile(path.join(olmSrcDir, file), path.join(olmDstDir, file)); } // transpile node-html-parser to esm await fs.mkdir(path.join(libDir, "node-html-parser/")); @@ -85,7 +85,7 @@ async function populateLib() { ); // Symlink dompurify await fs.mkdir(path.join(libDir, "dompurify/")); - await fs.symlink( + await fs.copyFile( require.resolve('dompurify/dist/purify.es.js'), path.join(libDir, "dompurify/index.js") );