diff --git a/lib/isomorphic/create-routes.js b/lib/isomorphic/create-routes.js index aa6b1e8204577..3150c98bcf746 100644 --- a/lib/isomorphic/create-routes.js +++ b/lib/isomorphic/create-routes.js @@ -141,6 +141,8 @@ module.exports = (files, pagesReq) => { let handler if (staticFileTypes.indexOf(page.file.ext) !== -1) { handler = wrappers[page.file.ext] + //replace the backslash in path + page.requirePath = page.requirePath.replace(/\\/g, '/'); page.data = pagesReq(`./${page.requirePath}`) } else if (reactComponentFileTypes.indexOf(page.file.ext) !== -1) { handler = pagesReq(`./${page.requirePath}`)