mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
Fix build on Windows (#381)
Use `path.dirName` instead of a `file.replace` on regex'd replaced string
This commit is contained in:
parent
65085b1337
commit
654916ae98
2 changed files with 7 additions and 7 deletions
|
@ -433,7 +433,7 @@ function execute(port) {
|
|||
path.basename(file),
|
||||
'temp' + path.basename(file)
|
||||
);
|
||||
mkdirp.sync(tempFile.replace(new RegExp('/[^/]*$'), ''));
|
||||
mkdirp.sync(path.dirname(tempFile));
|
||||
fs.copySync(userFile, tempFile);
|
||||
|
||||
// render into a string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue