File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module.exports = function hbsImports({ types: t }: { types: BabelTypes}) {
22
22
let cwd = process . cwd ( ) ;
23
23
ImportProcessor . options = Object . assign ( { } , state . opts ) ;
24
24
// @ts -ignore
25
- const fileName = path . hub . file . opts . filename ;
25
+ const fileName = path . hub . file . opts . filename . replace ( / \\ / g , '/' ) ;
26
26
if ( ! fileName ) return ;
27
27
if ( fileName . includes ( 'embroider' ) ) {
28
28
const parts = fileName . split ( '/' ) ;
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ const importProcessors = {
118
118
relativePath = relativePath . replace ( / ^ a p p \/ / , this . options . root + '/' ) ;
119
119
relativePath = relativePath . replace ( / ^ a d d o n \/ / , this . options . root + '/' ) ;
120
120
relativePath = relativePath . replace ( / ^ s r c \/ / , this . options . root + '/' ) ;
121
- importPath = path . join ( path . dirname ( relativePath ) , importPath ) . split ( path . sep ) . join ( '/' ) ;
121
+ importPath = path . resolve ( path . dirname ( relativePath ) , importPath ) . split ( path . sep ) . join ( '/' ) ;
122
122
importPath = importPath . replace ( 'node_modules/' , '' ) ;
123
123
// fix for missing app namespace in embroider
124
124
if ( ! importPath . startsWith ( this . options . namespace ) ) {
You can’t perform that action at this time.
0 commit comments