Ignore test files/folders in bundling

This commit is contained in:
Benjamin Toby 2026-04-20 06:15:55 +01:00
parent 40a987b983
commit f3bb972a20
3 changed files with 15 additions and 1 deletions

View File

@ -41,6 +41,12 @@ function grabPageDirRecursively({ page_dir, include_server, }) {
if (is_page_excluded) { if (is_page_excluded) {
continue; continue;
} }
if (full_page_path.match(/__test__/)) {
continue;
}
if (page_name.match(/\.test\.(t|j)sx?/)) {
continue;
}
if (page_name.match(/\.server\.tsx?/) && !include_server) { if (page_name.match(/\.server\.tsx?/) && !include_server) {
continue; continue;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/bunext", "name": "@moduletrace/bunext",
"version": "1.0.89", "version": "1.0.90",
"main": "dist/index.js", "main": "dist/index.js",
"module": "index.ts", "module": "index.ts",
"dependencies": { "dependencies": {

View File

@ -70,6 +70,14 @@ function grabPageDirRecursively({
continue; continue;
} }
if (full_page_path.match(/__test__/)) {
continue;
}
if (page_name.match(/\.test\.(t|j)sx?/)) {
continue;
}
if (page_name.match(/\.server\.tsx?/) && !include_server) { if (page_name.match(/\.server\.tsx?/) && !include_server) {
continue; continue;
} }