Skip to content

Commit

Permalink
try to fix windows errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Aug 28, 2020
1 parent b94ab01 commit c6facc3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ async function ensureAssetFileExist(fileSystemAssetPath, sourceFilePath) {

// transform the link node to a jsx link with a require() call
function toAssetRequireNode({node, index, parent, filePath, requireAssetPath}) {
// fix path on windows
const relativeAssetPathPosix = posixPath(requireAssetPath);

let relativeRequireAssetPath = path.relative(
path.dirname(filePath),
relativeAssetPathPosix,
let relativeRequireAssetPath = posixPath(
path.relative(path.dirname(filePath), requireAssetPath),
);

// nodejs does not like require("assets/file.pdf")
Expand Down

0 comments on commit c6facc3

Please sign in to comment.