We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d36ed6 commit 88058e1Copy full SHA for 88058e1
1 file changed
scripts/build-copy.js
@@ -42,7 +42,17 @@ fields.forEach((key) => {
42
if (typeof pck[key] === 'object') {
43
const keys = Object.keys(pck[key]);
44
keys.forEach((subkey) => {
45
- pck[key][subkey] = pck[key][subkey]?.replace('./dist/', './');
+ if (typeof pck[key][subkey] === 'string') {
46
+ pck[key][subkey] = pck[key][subkey]?.replace('./dist/', './');
47
+ } else if (typeof pck[key][subkey] === 'object') {
48
+ const sub = pck[key][subkey];
49
+ const subkeys = Object.keys(sub);
50
+ subkeys.forEach((subsubkey) => {
51
+ if (typeof sub[subsubkey] === 'string') {
52
+ sub[subsubkey] = sub[subsubkey]?.replace('./dist/', './');
53
+ }
54
+ });
55
56
});
57
} else {
58
pck[key] = pck[key]?.replace('./dist/', './');
0 commit comments