File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -102,18 +102,22 @@ module.exports = class ColocatedTemplateProcessor extends Plugin {
102102 let hasBackingClass = false ;
103103 let hasTemplate = this . inputHasFile ( basePath + '.hbs' ) ;
104104 let backingClassPath = basePath ;
105-
105+ let ext ;
106106 if ( this . inputHasFile ( basePath + '.js' ) ) {
107107 backingClassPath += '.js' ;
108+ ext = '.js' ;
108109 hasBackingClass = true ;
109110 } else if ( this . inputHasFile ( basePath + '.ts' ) ) {
110111 backingClassPath += '.ts' ;
112+ ext = '.ts' ;
111113 hasBackingClass = true ;
112114 } else if ( this . inputHasFile ( basePath + '.coffee' ) ) {
113115 backingClassPath += '.coffee' ;
116+ ext = '.coffee' ;
114117 hasBackingClass = true ;
115118 } else {
116119 backingClassPath += '.js' ;
120+ ext = '.js' ;
117121 hasBackingClass = false ;
118122 }
119123
@@ -173,10 +177,12 @@ module.exports = class ColocatedTemplateProcessor extends Plugin {
173177
174178 // It's not clear to me how to format this correctly for coffeescript.
175179 if ( ! backingClassPath . endsWith ( '.coffee' ) ) {
180+ let file = filePathParts . name + ext ;
176181 let jsContentsMap = jsContentsMagic . generateMap ( {
177- source : jsOutputPath ,
178- file : jsOutputPath ,
182+ source : backingClassPath ,
183+ file,
179184 includeContent : true ,
185+ hires : true
180186 } ) ;
181187
182188 jsContents += `\n//# sourceMappingURL=${ jsContentsMap . toUrl ( ) } ` ;
You can’t perform that action at this time.
0 commit comments