From 2e22b28bd71abf8a05a04871eba9fe62f5a7972f Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sun, 17 Dec 2023 15:15:07 +0000 Subject: [PATCH] Fix rollup for jsproj files (minified) --- rollup.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 6e80a9a3..147e267c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -90,14 +90,14 @@ if (process.env.BUILD === 'production') { // Remove all the lib files that will be included in the bundle .replace(/(?:|,)\s*/, '') // Replace any references to node_modules - .replace(/node_modules\/.*dist\/((?:js|css)\/)?/g, function (m, p1) { + .replace(/node_modules[\\/].*dist[\\/]((?:js|css)[\\/])?/g, function (m, p1) { p1 = p1 || 'js/'; return 'www/' + p1; }) // Alter remaining lib references .replace(/([\\/])js[\\/]lib/g, '$1js') // Remove unneeded ASM/WASM binaries - .replace(/["']www[\\/]js[\\/].*dec.*js["'],\s*/g, '') + .replace(/['"]www[\\/]js[\\/].*dec.*js['"],\s*/g, '') ); return result.code; }