Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
Use path.resolve() to define the path to client build's info
Browse files Browse the repository at this point in the history
  • Loading branch information
artkravchenko committed Oct 14, 2017
1 parent 1f8aea4 commit 18b2e5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/koa-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export function getReactMiddleware(appName, prefix, getRoutes, reduxInitializer,
const reactMiddleware = async (ctx) => {
if (!webpackChunks) {
try {
let chunksFilename = `${__dirname}/../webpack-chunks.json`;
let chunksFilename = path.resolve(__dirname, '../webpack-chunks.json');
if (isTest) {
chunksFilename = `${__dirname}/../../public/webpack-chunks.json`;
chunksFilename = path.resolve(__dirname, '../../public/webpack-chunks.json');
}

const data = await readFile(chunksFilename);
Expand Down

0 comments on commit 18b2e5e

Please sign in to comment.