From cc205954afeb4136b245d6a72d6f17f9496c52c3 Mon Sep 17 00:00:00 2001 From: Levertion <26185209+Levertion@users.noreply.github.com> Date: Sun, 16 Sep 2018 14:07:30 +0100 Subject: [PATCH 1/2] Cross-platform deterministic asset ids --- src/Asset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Asset.js b/src/Asset.js index e7ba3cb25f5..9d6fb11c985 100644 --- a/src/Asset.js +++ b/src/Asset.js @@ -21,7 +21,7 @@ class Asset { this.id = null; this.name = name; this.basename = path.basename(this.name); - this.relativeName = path.relative(options.rootDir, this.name); + this.relativeName = path.relative(options.rootDir, this.name).replace(/\\/g, "/"); this.options = options; this.encoding = 'utf8'; this.type = path.extname(this.name).slice(1); From 0b7cc9d0b25c71114945c8ffdd79f8c07753aa37 Mon Sep 17 00:00:00 2001 From: Levertion <26185209+Levertion@users.noreply.github.com> Date: Sun, 16 Sep 2018 15:34:51 +0100 Subject: [PATCH 2/2] Prettier format Asset.js --- src/Asset.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Asset.js b/src/Asset.js index 9d6fb11c985..e37da38422f 100644 --- a/src/Asset.js +++ b/src/Asset.js @@ -21,7 +21,9 @@ class Asset { this.id = null; this.name = name; this.basename = path.basename(this.name); - this.relativeName = path.relative(options.rootDir, this.name).replace(/\\/g, "/"); + this.relativeName = path + .relative(options.rootDir, this.name) + .replace(/\\/g, '/'); this.options = options; this.encoding = 'utf8'; this.type = path.extname(this.name).slice(1);