11import { defineConfig } from 'vite';
22import laravel from 'laravel-vite-plugin';
3+ import { readdirSync, statSync } from 'fs';
4+ import { join,relative,dirname } from 'path';
5+ import { fileURLToPath } from 'url';
36
47export default defineConfig({
58 build: {
@@ -19,8 +22,36 @@ export default defineConfig({
1922 }),
2023 ],
2124});
25+ // Scen all resources for assets file. Return array
26+ //function getFilePaths(dir) {
27+ // const filePaths = [];
28+ //
29+ // function walkDirectory(currentPath) {
30+ // const files = readdirSync(currentPath);
31+ // for (const file of files) {
32+ // const filePath = join(currentPath, file);
33+ // const stats = statSync(filePath);
34+ // if (stats.isFile() && !file.startsWith('.')) {
35+ // const relativePath = 'Modules/$STUDLY_NAME$/'+relative(__dirname, filePath);
36+ // filePaths.push(relativePath);
37+ // } else if (stats.isDirectory()) {
38+ // walkDirectory(filePath);
39+ // }
40+ // }
41+ // }
42+ //
43+ // walkDirectory(dir);
44+ // return filePaths;
45+ //}
46+
47+ //const __filename = fileURLToPath(import.meta.url);
48+ //const __dirname = dirname(__filename);
49+
50+ //const assetsDir = join(__dirname, 'resources/assets');
51+ //export const paths = getFilePaths(assetsDir);
52+
2253
2354//export const paths = [
2455// 'Modules/$STUDLY_NAME$/resources/assets/sass/app.scss',
2556// 'Modules/$STUDLY_NAME$/resources/assets/js/app.js',
26- //];
57+ //];
0 commit comments