Skip to content

Commit

Permalink
fix: added exclude rule for node_modules and dist to the auto preset
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis committed Jan 25, 2025
1 parent 6fcc271 commit 84ad8ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/packem/src/hooks/preset/auto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const autoPreset: BuildPreset = {
throw new Error("No 'src' directory found. Please provide entries manually.");
}

const sourceFiles = collectSync(sourceDirectory, { extensions: [], includeDirs: false, includeSymlinks: false });
const sourceFiles = collectSync(sourceDirectory, { extensions: [], includeDirs: false, includeSymlinks: false, skip: [/.*\/node_modules\/.*/, /.*\/dist\/.*/] });

if (sourceFiles.length === 0) {
throw new Error("No source files found in 'src' directory. Please provide entries manually.");
Expand Down

0 comments on commit 84ad8ae

Please sign in to comment.