Commit ddff22c0 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by GitHub

Revert "Make the chunk name a bit pretty." (#2792)

This reverts commit 0c9e8cf2271955e74ab9f752b5869b98c1dc60f9.
parent 265296c7
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// We've added support for SSR with this version // We've added support for SSR with this version
import template from 'babel-template' import template from 'babel-template'
import syntax from 'babel-plugin-syntax-dynamic-import' import syntax from 'babel-plugin-syntax-dynamic-import'
import { dirname, resolve, sep } from 'path' import { dirname, resolve } from 'path'
import Crypto from 'crypto' import Crypto from 'crypto'
const TYPE_IMPORT = 'Import' const TYPE_IMPORT = 'Import'
...@@ -62,7 +62,7 @@ export default () => ({ ...@@ -62,7 +62,7 @@ export default () => ({
const modulePath = getModulePath(sourceFilename, moduleName) const modulePath = getModulePath(sourceFilename, moduleName)
const modulePathHash = Crypto.createHash('md5').update(modulePath).digest('hex') 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 name = `${relativeModulePath.replace(/[^\w]/g, '-')}-${modulePathHash}`
const newImport = buildImport({ const newImport = buildImport({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment