diff --git a/.changeset/two-fans-taste.md b/.changeset/two-fans-taste.md new file mode 100644 index 00000000000..2756ff24df8 --- /dev/null +++ b/.changeset/two-fans-taste.md @@ -0,0 +1,5 @@ +--- +'@talend/scripts-config-react-webpack': patch +--- + +Fix getTalendIconsPath diff --git a/tools/scripts-config-react-webpack/config/icons.js b/tools/scripts-config-react-webpack/config/icons.js index 4026cc6fd7f..1a2a07fb122 100644 --- a/tools/scripts-config-react-webpack/config/icons.js +++ b/tools/scripts-config-react-webpack/config/icons.js @@ -17,10 +17,10 @@ function getTalendIconsPath() { if (main.indexOf('.pnpm') > -1) { const startPath = main.substring(0, main.indexOf('icons')); - const regex = /@talend\+icons@([^\s/]+)/; + const regex = /@talend\+icons@([^\s/\\]+)/; const match = main.match(regex); const version = match[1]; - return `${startPath}icons@${version}/node_modules/@talend/icons`; + return path.join(`${startPath}icons@${version}`, 'node_modules', '@talend', 'icons'); } const root = main.split('icons')[0]; return `${root}icons`;