From ddff22c0d37bc3708628161008858f1de7b488f4 Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Thu, 17 Aug 2017 00:28:30 +0530 Subject: [PATCH] Revert "Make the chunk name a bit pretty." (#2792) This reverts commit 0c9e8cf2271955e74ab9f752b5869b98c1dc60f9. --- server/build/babel/plugins/handle-import.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/build/babel/plugins/handle-import.js b/server/build/babel/plugins/handle-import.js index 164ddd57..62162b8c 100644 --- a/server/build/babel/plugins/handle-import.js +++ b/server/build/babel/plugins/handle-import.js @@ -2,7 +2,7 @@ // We've added support for SSR with this version import template from 'babel-template' import syntax from 'babel-plugin-syntax-dynamic-import' -import { dirname, resolve, sep } from 'path' +import { dirname, resolve } from 'path' import Crypto from 'crypto' const TYPE_IMPORT = 'Import' @@ -62,7 +62,7 @@ export default () => ({ const modulePath = getModulePath(sourceFilename, moduleName) const modulePathHash = Crypto.createHash('md5').update(modulePath).digest('hex') - const relativeModulePath = modulePath.replace(`${process.cwd()}${sep}`, '') + const relativeModulePath = modulePath.replace(process.cwd(), '') const name = `${relativeModulePath.replace(/[^\w]/g, '-')}-${modulePathHash}` const newImport = buildImport({