We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e24dfd9 commit 1320b02Copy full SHA for 1320b02
src/Resources/AbstractDispatchableResource.php
@@ -95,9 +95,18 @@ protected function _processContent()
95
$map = $this->_filePath . '.map';
96
if(file_exists($map))
97
{
98
- $this->_content .= '/*# sourceMappingURL=data:application/json;charset=utf8;base64,'
99
- . base64_encode(file_get_contents($map))
100
- . '*/';
+
+ if(strpos($this->_path, '.js') !== false)
+ {
101
+ $this->_content .= PHP_EOL . '//# sourceMappingURL=data:application/json;charset=utf-8;base64,'
102
+ . base64_encode(file_get_contents($map));
103
+ }
104
+ else
105
106
+ $this->_content .= '/*# sourceMappingURL=data:application/json;charset=utf8;base64,'
107
+ . base64_encode(file_get_contents($map))
108
+ . '*/';
109
110
}
111
112
0 commit comments