UNPKG

@tanstack/router-plugin

Version:

Modern and scalable routing for React applications

15 lines (13 loc) 539 B
export const debug = process.env.TSR_VITE_DEBUG && ['true', 'router-plugin'].includes(process.env.TSR_VITE_DEBUG) /** * Normalizes a file path by converting Windows backslashes to forward slashes. * This ensures consistent path handling across different bundlers and operating systems. * * The route generator stores paths with forward slashes, but rspack/webpack on Windows * pass native paths with backslashes to transform handlers. */ export function normalizePath(path: string): string { return path.replace(/\\/g, '/') }