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(
2020 ? parsed . specifier . slice ( 1 )
2121 : parsed . specifier
2222 )
23- console . log ( '🔍' , specifier )
2423
2524 // bail out faster for anything that is not a data loader
2625 if ( ! filterPaths ( specifier ) ) return [ ]
@@ -43,7 +42,6 @@ export function createAutoExportPlugin({
4342 loadersPathsGlobs : string | string [ ]
4443 root : string
4544} ) : UnpluginOptions {
46- console . log ( 'Creating auto-export plugin' , loadersPathsGlobs )
4745 const filterPaths = createFilter ( loadersPathsGlobs )
4846
4947 return {
Original file line number Diff line number Diff line change @@ -241,9 +241,7 @@ export const DEFAULT_OPTIONS = {
241241 dotNesting : true ,
242242 } ,
243243 watch : ! process . env . CI ,
244- experimental : {
245- autoExportsDataLoaders : 'src/loaders/**/*' ,
246- } ,
244+ experimental : { } ,
247245} satisfies Options
248246
249247export interface ServerContext {
@@ -302,11 +300,13 @@ export function resolveOptions(options: Options) {
302300 src : resolve ( root , routeOption . src ) ,
303301 } ) )
304302
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 ]
310310 ) . map ( ( path ) => resolve ( root , path ) )
311311 }
312312
@@ -341,6 +341,7 @@ export function resolveOptions(options: Options) {
341341 return {
342342 ...DEFAULT_OPTIONS ,
343343 ...options ,
344+ experimental,
344345 routesFolder,
345346 filePatterns,
346347 exclude,
You can’t perform that action at this time.
0 commit comments