Skip to content

Commit

Permalink
Fix prepare bundle on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Sep 27, 2022
1 parent b42f0ed commit 6cc0971
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/prepare/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { build } from 'tsup';
import aliasPlugin from 'esbuild-plugin-alias';
import dedent from 'ts-dedent';
import { exec } from '../utils/exec';
import slash from 'slash';

const hasFlag = (flags: string[], name: string) => !!flags.find((s) => s.startsWith(`--${name}`));

Expand Down Expand Up @@ -54,7 +55,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
const tsConfigExists = await fs.pathExists(tsConfigPath);
await Promise.all([
build({
entry: entries.map((e: string) => join(cwd, e)),
entry: entries.map((e: string) => slash(join(cwd, e))),
watch,
...(tsConfigExists ? { tsconfig: tsConfigPath } : {}),
outDir: join(process.cwd(), 'dist'),
Expand Down Expand Up @@ -101,7 +102,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
},
}),
build({
entry: entries.map((e: string) => join(cwd, e)),
entry: entries.map((e: string) => slash(join(cwd, e))),
watch,
outDir: join(process.cwd(), 'dist'),
...(tsConfigExists ? { tsconfig: tsConfigPath } : {}),
Expand Down

0 comments on commit 6cc0971

Please sign in to comment.