From beac4577c527b44858ae9a5194afda59453faac9 Mon Sep 17 00:00:00 2001 From: Bradley Kirby Date: Wed, 18 Mar 2020 21:18:39 -0400 Subject: [PATCH] fixes windows path compat issue #21 --- lib/configure.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/configure.js b/lib/configure.js index 5f078a1..f14119e 100644 --- a/lib/configure.js +++ b/lib/configure.js @@ -112,8 +112,8 @@ class Configure { if (this.shopify) { this.publicPath = this.defaults.publicPath } else { - const uri = this.webpack.output.path.split('/wp-content/')[1] - this.publicPath = `/wp-content/${uri}` + const uri = this.webpack.output.path.split(`${path.sep}wp-content${path.sep}`)[1] + this.publicPath = `/wp-content/${uri}`.replace(/\\/g, '/'); } }