From 3de08bc024817a6ea57526c288928eba83d8eb68 Mon Sep 17 00:00:00 2001 From: Shaobo Lua Date: Wed, 21 Feb 2024 19:33:39 +0800 Subject: [PATCH] fix(fes): [hackFesInBuild] fix issues #210 (#232) Co-authored-by: neo.st.fox --- packages/fes/src/hackFesInBuild.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fes/src/hackFesInBuild.js b/packages/fes/src/hackFesInBuild.js index e9efefd4..cb2db83b 100644 --- a/packages/fes/src/hackFesInBuild.js +++ b/packages/fes/src/hackFesInBuild.js @@ -1,9 +1,9 @@ // my-module/register.js +import { join } from 'node:path'; import { addHook } from 'pirates'; function matcher(filename) { - if (filename.endsWith('/fes/lib/index.js')) return true; - return false; + return filename.endsWith(join(...['fes', 'lib', 'index.js'])); } export function hackFesInBuild() {