File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ npm-debug.log
66.DS_Store
77yarn.lock
88test /fixtures /egg /node_modules /egg-core
9+ .idea
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ class FileLoader {
153153 // app/service/foo/bar.js => [ 'foo', 'bar' ]
154154 const properties = getProperties ( filepath , this . options ) ;
155155 // app/service/foo/bar.js => service.foo.bar
156- const pathName = directory . split ( / \/ | \\ / ) . slice ( - 1 ) + '.' + properties . join ( '.' ) ;
156+ const pathName = directory . split ( / [ / \\ ] / ) . slice ( - 1 ) + '.' + properties . join ( '.' ) ;
157157 // get exports from the file
158158 const exports = getExports ( fullpath , this . options , pathName ) ;
159159
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ module.exports = {
7575 } ,
7676
7777 getResolvedFilename ( filepath , baseDir ) {
78- const reg = / \\ | \/ / g;
78+ const reg = / [ / \\ ] / g;
7979 return filepath . replace ( baseDir + path . sep , '' ) . replace ( reg , '/' ) ;
8080 } ,
8181} ;
You can’t perform that action at this time.
0 commit comments