Skip to content

Commit

Permalink
Refactor: remove unnecessary quote escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
ayastreb committed Jun 20, 2017
1 parent 7f1d60d commit cd2f022
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/node/NodeMainTemplatePlugin.js
Expand Up @@ -71,7 +71,7 @@ module.exports = class NodeMainTemplatePlugin {
"installedChunks[chunkId] = [resolve, reject];",
"var filename = __dirname + " + this.applyPluginsWaterfall("asset-path", JSON.stringify(`/${chunkFilename}`), {
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + \"`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + "`,
chunk: {
id: "\" + chunkId + \"",
hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`,
Expand Down Expand Up @@ -114,7 +114,7 @@ module.exports = class NodeMainTemplatePlugin {
} else {
const request = this.applyPluginsWaterfall("asset-path", JSON.stringify(`./${chunkFilename}`), {
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + \"`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + "`,
chunk: {
id: "\" + chunkId + \"",
hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`,
Expand Down Expand Up @@ -149,7 +149,7 @@ module.exports = class NodeMainTemplatePlugin {
const chunkMaps = chunk.getChunkMaps();
const currentHotUpdateChunkFilename = this.applyPluginsWaterfall("asset-path", JSON.stringify(hotUpdateChunkFilename), {
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + \"`,
hashWithLength: (length) => `" + ${this.renderCurrentHashCode(hash, length)} + "`,
chunk: {
id: "\" + chunkId + \"",
hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`,
Expand Down

0 comments on commit cd2f022

Please sign in to comment.