File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
server/build/babel/plugins Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
// We've added support for SSR with this version
3
3
import template from 'babel-template'
4
4
import syntax from 'babel-plugin-syntax-dynamic-import'
5
- import { dirname , resolve } from 'path'
5
+ import { dirname , resolve , sep } from 'path'
6
6
import Crypto from 'crypto'
7
7
8
8
const TYPE_IMPORT = 'Import'
@@ -62,8 +62,8 @@ export default () => ({
62
62
const modulePath = getModulePath ( sourceFilename , moduleName )
63
63
const modulePathHash = Crypto . createHash ( 'md5' ) . update ( modulePath ) . digest ( 'hex' )
64
64
65
- const relativeModulePath = modulePath . replace ( process . cwd ( ) , '' )
66
- const name = `${ relativeModulePath . replace ( / [ ^ \w ] / g, '- ' ) } - ${ modulePathHash } `
65
+ const relativeModulePath = modulePath . replace ( ` ${ process . cwd ( ) } ${ sep } ` , '' )
66
+ const name = `${ relativeModulePath . replace ( / [ ^ \w ] / g, '_ ' ) } _ ${ modulePathHash } `
67
67
68
68
const newImport = buildImport ( {
69
69
name
You can’t perform that action at this time.
0 commit comments