From a89e99db66601fee31057c7ae7b2ca3bdb25ac9f Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 15 May 2021 19:12:18 -0400 Subject: [PATCH] fix bad logic (#608) --- packages/cli/src/plugins/resource/plugin-user-workspace.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/plugins/resource/plugin-user-workspace.js b/packages/cli/src/plugins/resource/plugin-user-workspace.js index ce3a959f7..693ebe770 100644 --- a/packages/cli/src/plugins/resource/plugin-user-workspace.js +++ b/packages/cli/src/plugins/resource/plugin-user-workspace.js @@ -21,8 +21,9 @@ class UserWorkspaceResource extends ResourceInterface { async shouldResolve(url = '/') { const bareUrl = this.getBareUrlPath(url); + const isWorkspaceFile = fs.existsSync(path.join(this.compilation.context.userWorkspace, bareUrl)); - return Promise.resolve(fs.existsSync(this.compilation.context.userWorkspace, bareUrl) || bareUrl === '/'); + return Promise.resolve(isWorkspaceFile || bareUrl === '/'); } async resolve(url = '/') {