Skip to content

Commit

Permalink
Revert "Make the chunk name a bit pretty." (vercel#2792)
Browse files Browse the repository at this point in the history
This reverts commit 0c9e8cf.
  • Loading branch information
arunoda authored Aug 16, 2017
1 parent 265296c commit ddff22c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/build/babel/plugins/handle-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit ddff22c

Please sign in to comment.