From 24a6a2d026380fe02b476c20f8210ae5265f794a Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Thu, 12 Dec 2019 03:57:09 -0500 Subject: [PATCH] (fix): fix CJS for entries that are in subdirs of src/ - use fs.outFile to mkdirp the equivalent subdirectory in dist/ if it didn't exist before --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 39dd4709d..5d474ee77 100755 --- a/src/index.ts +++ b/src/index.ts @@ -535,7 +535,7 @@ if (process.env.NODE_ENV === 'production') { } `; const filename = numNames === 1 ? 'index.js' : `${name}.js`; - return fs.writeFile(path.join(paths.appDist, filename), contents); + return fs.outputFile(path.join(paths.appDist, filename), contents); } function getAuthorName() {