Skip to content

Commit ecd5f34

Browse files
committed
build: exclude /playground s from build
1 parent 3ae006f commit ecd5f34

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

nuxt.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,14 @@ export default defineNuxtConfig({
3434
{ code: 'ar', name: 'العربية', file: 'ar.json', dir: 'rtl' },
3535
],
3636
},
37+
hooks: {
38+
'pages:extend'(pages) {
39+
// Remove playground pages in production
40+
if (process.env.NODE_ENV === 'production') {
41+
const filteredPages = pages.filter((page) => !page.file?.includes('/pages/playground/'));
42+
pages.length = 0;
43+
pages.push(...filteredPages);
44+
}
45+
},
46+
},
3747
});

0 commit comments

Comments
 (0)