Skip to content

Commit 04d4990

Browse files
authored
Fix module loading on systems that use '\' instead of '/' as the path separator. (#193)
1 parent 0961b48 commit 04d4990

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/jsii-kernel/lib/kernel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class Kernel {
126126
await fs.move(path.join(staging, 'package'), packageDir);
127127

128128
// load the module and capture it's closure
129-
const closure = this._execute(`require("${packageDir}")`, packageDir);
129+
const closure = this._execute(`require(String.raw\`${packageDir}\`)`, packageDir);
130130
const assm = new Assembly(assmSpec, closure);
131131
this._addAssembly(assm);
132132

0 commit comments

Comments
 (0)