Skip to content

Commit 978b22f

Browse files
authored
fix(scripts): Fix compile helper method for path compatibility across platforms (#4596)
1 parent 2e18625 commit 978b22f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/compile/helpers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
const I = require('immutable-ext');
55
const Either = require('data.either');
6-
const path = require('path');
76
const { ui, variants } = require('../ui');
87

98
const FOLDERNAME = '__internal';
109

11-
const webpackPath = prefix => filepath =>
12-
path.join(prefix, filepath.replace(/^\.\//, '').concat('.js'));
10+
const webpackPath = prefix => filepath => {
11+
const pathSegments = filepath.concat('.js').split('/');
12+
return `${prefix}/${pathSegments.join('/')}`;
13+
};
1314

1415
const setKeyIfExists = (keypath, fixFilePath) => (entry, item) =>
1516
Either.fromNullable(item.get(keypath)).fold(

0 commit comments

Comments
 (0)