Skip to content

Commit

Permalink
Merge pull request #2501 from FormidableLabs/windows-paths-fix
Browse files Browse the repository at this point in the history
Fix path issues when building on windows os
  • Loading branch information
EthanRutherford committed Oct 19, 2022
2 parents efadbf4 + 9f7e036 commit 272649b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/webpack/demo/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");

const ROOT = path.resolve(__dirname, "../../.."); // eslint-disable-line no-undef
const PKGS = path.join(ROOT, "packages")
const VICTORY_GLOB = path.join(PKGS, "victory*/package.json").replaceAll('\\', '/');
// Read all the victory packages and alias.
const VICTORY_ALIASES = glob.sync(path.join(PKGS, "victory*/package.json"))
const VICTORY_ALIASES = glob.sync(VICTORY_GLOB)
.reduce((memo, pkgPath) => {
const key = path.dirname(path.relative(PKGS, pkgPath));
memo[key] = path.resolve(path.dirname(pkgPath));
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-vendor/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = {
const relPathToPkg = path.relative(
path.dirname(currentFileVendor),
vendorPkg,
);
).replaceAll("\\", "/");

return relPathToPkg;
}
Expand Down

0 comments on commit 272649b

Please sign in to comment.