diff --git a/scripts/transpilation/copy-css.js b/scripts/transpilation/copy-css.js index 8b5502f0d8..be7bace0fd 100644 --- a/scripts/transpilation/copy-css.js +++ b/scripts/transpilation/copy-css.js @@ -33,7 +33,7 @@ cssFiles.map((cssFile) => { const componentPath = paths[1].split('/'); // V2 components are nested inside a folder - if (paths[1].match(/V2/)) { + if (paths[1].match(/\/Bpk.*\//) || paths[1].match(/__generated__/)){ component = `${componentPath[0]}/${componentPath[1]}/${componentPath[2]}`; } else { component = `${componentPath[0]}/${componentPath[1]}`; diff --git a/scripts/transpilation/copy-types.js b/scripts/transpilation/copy-types.js index ad109ffa74..c279afab24 100644 --- a/scripts/transpilation/copy-types.js +++ b/scripts/transpilation/copy-types.js @@ -34,8 +34,8 @@ typeFiles.map((typeFile) => { const paths = typeFile.split('packages/'); const componentPath = paths[1].split('/'); - // V2 components are nested inside a folder - if (paths[1].match(/V2/)) { + // V2 or some components are nested inside a folder + if (paths[1].match(/\/Bpk.*\//) || paths[1].match(/__generated__/)) { component = `${componentPath[0]}/${componentPath[1]}/${componentPath[2]}`; } else { component = `${componentPath[0]}/${componentPath[1]}`;