1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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

This reverts commit 0c9e8cf2271955e74ab9f752b5869b98c1dc60f9.
This commit is contained in:
Arunoda Susiripala 2017-08-17 00:28:30 +05:30 committed by GitHub
parent 265296c7dd
commit ddff22c0d3

View file

@ -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({