Skip to content

Commit

Permalink
Fix require path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
chnguyen authored and chnguyen committed Mar 7, 2022
1 parent f574fff commit 1109edf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AppsCompiler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from 'fs';
import * as path from 'path';
import * as fallbackTypescript from 'typescript';

import { createRequire } from 'module';
Expand Down Expand Up @@ -26,7 +27,7 @@ export class AppsCompiler {
private readonly sourcePath: string,
ts: TypeScript = fallbackTypescript,
) {
this.validator = new AppsEngineValidator(createRequire(`${ sourcePath }/app.json`));
this.validator = new AppsEngineValidator(createRequire(path.join(sourcePath, 'app.json')));

this.typescriptCompiler = new TypescriptCompiler(sourcePath, ts, this.validator);
this.bundler = getBundler(AvailableBundlers.esbuild);
Expand Down

0 comments on commit 1109edf

Please sign in to comment.