Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit c332988

Browse files
Use an absolute path for files from the process root so that ES6 module import statements work correctly.
1 parent bf14a38 commit c332988

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/gulp/concat-to-json.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ function json_file(src, path, source_map) {
4444
* @return {string}
4545
*/
4646
module.exports = function(files) {
47+
var path = require('path');
4748
var jsonFiles = [];
4849
for (var i = 0; i < files.length; i++) {
4950
jsonFiles.push(
5051
json_file(files[i].contents.toString(),
51-
files[i].relative,
52+
'/' + path.relative(process.cwd(), files[i].path),
5253
files[i].sourceMap ? JSON.stringify(files[i].sourceMap) : undefined));
5354
}
5455

0 commit comments

Comments
 (0)