File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,8 @@ export default defineNuxtModule<ModuleOptions>({
226
226
const route = '/_tailwind'
227
227
const createServer = await import ( 'tailwind-config-viewer/server/index.js' ) . then ( r => r . default || r ) as any
228
228
const { withTrailingSlash, withoutTrailingSlash } = await import ( 'ufo' )
229
- const _viewerDevMiddleware = createServer ( { tailwindConfigProvider : ( ) => tailwindConfig , routerPrefix : route } ) . asMiddleware ( )
229
+ const routerPrefix = isNuxt3 ( ) ? route : undefined
230
+ const _viewerDevMiddleware = createServer ( { tailwindConfigProvider : ( ) => tailwindConfig , routerPrefix } ) . asMiddleware ( )
230
231
const viewerDevMiddleware = ( req , res ) => {
231
232
if ( req . originalUrl === withoutTrailingSlash ( route ) ) {
232
233
res . writeHead ( 301 , { Location : withTrailingSlash ( req . originalUrl ) } )
You can’t perform that action at this time.
0 commit comments