Skip to content

Commit

Permalink
fix(nodemaintemplate): resolve async chunk path platform agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Sep 14, 2018
1 parent 6bf8323 commit 2df7b0c
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 2df7b0c

Please sign in to comment.