diff --git a/packages/jsii-kernel/lib/kernel.ts b/packages/jsii-kernel/lib/kernel.ts index bcbd4e5ffc..867f4d5d00 100644 --- a/packages/jsii-kernel/lib/kernel.ts +++ b/packages/jsii-kernel/lib/kernel.ts @@ -126,7 +126,7 @@ export class Kernel { await fs.move(path.join(staging, 'package'), packageDir); // load the module and capture it's closure - const closure = this._execute(`require("${packageDir}")`, packageDir); + const closure = this._execute(`require(String.raw\`${packageDir}\`)`, packageDir); const assm = new Assembly(assmSpec, closure); this._addAssembly(assm);