Skip to content

Commit

Permalink
Merge pull request #8035 from kwonoj/fix-path
Browse files Browse the repository at this point in the history
fix(nodemaintemplate): resolve async chunk path platform agnostic
  • Loading branch information
sokra committed Sep 15, 2018
2 parents 6bf8323 + 2df7b0c commit 5258471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/node/NodeMainTemplatePlugin.js
Expand Up @@ -96,7 +96,7 @@ module.exports = class NodeMainTemplatePlugin {
"var promise = new Promise(function(resolve, reject) {",
Template.indent([
"installedChunkData = installedChunks[chunkId] = [resolve, reject];",
"var filename = __dirname + " +
"var filename = require('path').join(__dirname, " +
mainTemplate.getAssetPath(
JSON.stringify(`/${chunkFilename}`),
{
Expand Down Expand Up @@ -155,7 +155,7 @@ module.exports = class NodeMainTemplatePlugin {
contentHashType: "javascript"
}
) +
";",
");",
"require('fs').readFile(filename, 'utf-8', function(err, content) {",
Template.indent(
[
Expand Down

0 comments on commit 5258471

Please sign in to comment.