Skip to content

Commit

Permalink
Make wasm files load on ssr (vercel#4942)
Browse files Browse the repository at this point in the history
* Make wasm files load on ssr

* Upgrade React for tests
  • Loading branch information
timneutkens authored Aug 10, 2018
1 parent b990b29 commit 2e62b87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/webpack/plugins/nextjs-ssr-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class NextJsSsrImportPlugin {
// Make sure even in windows, the path looks like in unix
// Node.js require system will convert it accordingly
const relativePathToBaseDirNormalized = relativePathToBaseDir.replace(/\\/g, '/')
return code.replace('require("./"', `require("${relativePathToBaseDirNormalized}/"`)
return code.replace('require("./"', `require("${relativePathToBaseDirNormalized}/"`).replace('readFile(join(__dirname', `readFile(join(__dirname, "${relativePathToBaseDirNormalized}"`)
})
})
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
"node-notifier": "5.1.2",
"node-sass": "4.9.2",
"nyc": "11.2.1",
"react": "16.4.0",
"react-dom": "16.4.0",
"react": "16.4.2",
"react-dom": "16.4.2",
"rimraf": "2.6.2",
"standard": "11.0.1",
"taskr": "1.1.0",
Expand Down

0 comments on commit 2e62b87

Please sign in to comment.