diff --git a/packages/html/misc/esbuild-plugin-shared.js b/packages/html/misc/esbuild-plugin-shared.js
index 0486e6d8c79..42c318b26d6 100644
--- a/packages/html/misc/esbuild-plugin-shared.js
+++ b/packages/html/misc/esbuild-plugin-shared.js
@@ -10,7 +10,8 @@ module.exports = ({ dir: sharedDir, main: mainFile }) => ({
build.initialOptions.entryPoints = entryPoints;
- const entryPointsRegex = new RegExp(`(${entryPoints.join("|")})`);
+ // Esbuild will parse this to a GO Regex which causes Windows paths to fail.
+ const entryPointsRegex = new RegExp(`(${entryPoints.map(e => e.replace(/\\/g, '[\\\\]')).join("|")})`, 'g');
const sharedMain = p.join(sharedDir, mainFile);
const sharedApp = fs.readFileSync(sharedMain, "utf-8");
diff --git a/scripts/start-dev-server.js b/scripts/start-dev-server.js
index 78d44def034..b07651e3ab9 100644
--- a/scripts/start-dev-server.js
+++ b/scripts/start-dev-server.js
@@ -26,11 +26,11 @@ entryPoints.forEach((point) => entiresMap.add(point));
servedir: "./",
port: 8000,
});
- const outputs = glob.sync(`./packages/html/dist/**/tests/**/app.js`, { dotRelative: true });
+ const outputs = glob.sync(`./packages/html/dist/**/tests/**/app.js`, { dotRelative: false });
// Then start a proxy server on port 3000
http.createServer((req, res) => {
- const tests = outputs.map((point) => path.join(path.dirname(point)));
+ const tests = outputs.map(t => t.replace(/\\/g, '/')).map((point) => path.dirname(point));
const options = {
hostname: host,