diff --git a/package.json b/package.json index 3c7d8912f3..2dcc639b23 100644 --- a/package.json +++ b/package.json @@ -216,6 +216,7 @@ "rollup-plugin-terser": "^2.0.2", "sass-loader": "7.1.0", "script-ext-html-webpack-plugin": "2.0.1", + "slash": "^3.0.0", "source-map": "0.7.3", "source-map-loader": "0.2.4", "string-replace-loader": "^2.1.1", diff --git a/webpack/helpers.js b/webpack/helpers.js index c4fcebe152..c6920ea435 100644 --- a/webpack/helpers.js +++ b/webpack/helpers.js @@ -1,6 +1,6 @@ const path = require('path'); const fs = require('fs'); - +const slash = require('slash'); const projectRoot = (relativePath) => { return path.resolve(__dirname, '..', relativePath); @@ -68,7 +68,7 @@ const globalCSSImports = (env) => { return [ const getThemedPath = (componentPath, ext) => { const parsedPath = path.parse(componentPath); const relativePath = path.relative(srcPath, parsedPath.dir); - return path.join(relativeThemePath, relativePath, `${parsedPath.name}.${ext}`); + return slash(path.join(relativeThemePath, relativePath, `${parsedPath.name}.${ext}`)); }; const themedTest = (origPath, extension) => { diff --git a/yarn.lock b/yarn.lock index 3530c41150..bab6f350f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9514,6 +9514,11 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slide@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"