Skip to content

Commit

Permalink
(fix): fix CJS for entries that are in subdirs of src/
Browse files Browse the repository at this point in the history
- use fs.outFile to mkdirp the equivalent subdirectory in dist/ if it
  didn't exist before
  • Loading branch information
agilgur5 committed Dec 12, 2019
1 parent 821a1ad commit 24a6a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 24a6a2d

Please sign in to comment.