Skip to content

Commit d1baf70

Browse files
committed
fix(tools): get repo root in 11ty plugins
1 parent cd04ae8 commit d1baf70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pfe-tools/11ty/plugins/pfe-assets.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function exists(x) {
1313
/** Generate a map of files per package which should be copied to the site dir */
1414
function getFilesToCopy() {
1515
/** best guess at abs-path to repo root */
16-
const repoRoot = path.join(__dirname, '..', '..', '..', '..').replace(/node_modules\/$/, '');
16+
const repoRoot = path.join(__dirname, '..', '..', '..', '..').replace(/node_modules\/?$/g, '');
1717

1818
// Copy all component and core files to _site
1919
const files = Object.fromEntries(fs.readdirSync(path.join(repoRoot, 'elements')).map(dir => [

0 commit comments

Comments
 (0)