File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ export function extractLoadersToExport(
20
20
? parsed . specifier . slice ( 1 )
21
21
: parsed . specifier
22
22
)
23
- console . log ( '🔍' , specifier )
24
23
25
24
// bail out faster for anything that is not a data loader
26
25
if ( ! filterPaths ( specifier ) ) return [ ]
@@ -43,7 +42,6 @@ export function createAutoExportPlugin({
43
42
loadersPathsGlobs : string | string [ ]
44
43
root : string
45
44
} ) : UnpluginOptions {
46
- console . log ( 'Creating auto-export plugin' , loadersPathsGlobs )
47
45
const filterPaths = createFilter ( loadersPathsGlobs )
48
46
49
47
return {
Original file line number Diff line number Diff line change @@ -241,9 +241,7 @@ export const DEFAULT_OPTIONS = {
241
241
dotNesting : true ,
242
242
} ,
243
243
watch : ! process . env . CI ,
244
- experimental : {
245
- autoExportsDataLoaders : 'src/loaders/**/*' ,
246
- } ,
244
+ experimental : { } ,
247
245
} satisfies Options
248
246
249
247
export interface ServerContext {
@@ -302,11 +300,13 @@ export function resolveOptions(options: Options) {
302
300
src : resolve ( root , routeOption . src ) ,
303
301
} ) )
304
302
305
- if ( options . experimental ?. autoExportsDataLoaders ) {
306
- options . experimental . autoExportsDataLoaders = (
307
- Array . isArray ( options . experimental . autoExportsDataLoaders )
308
- ? options . experimental . autoExportsDataLoaders
309
- : [ options . experimental . autoExportsDataLoaders ]
303
+ const experimental = { ...options . experimental }
304
+
305
+ if ( experimental . autoExportsDataLoaders ) {
306
+ experimental . autoExportsDataLoaders = (
307
+ Array . isArray ( experimental . autoExportsDataLoaders )
308
+ ? experimental . autoExportsDataLoaders
309
+ : [ experimental . autoExportsDataLoaders ]
310
310
) . map ( ( path ) => resolve ( root , path ) )
311
311
}
312
312
@@ -341,6 +341,7 @@ export function resolveOptions(options: Options) {
341
341
return {
342
342
...DEFAULT_OPTIONS ,
343
343
...options ,
344
+ experimental,
344
345
routesFolder,
345
346
filePatterns,
346
347
exclude,
You can’t perform that action at this time.
0 commit comments