From 1e596b79fdb883396b00ad5e12d555776dcafbe0 Mon Sep 17 00:00:00 2001 From: Julien Ripouteau Date: Wed, 28 Feb 2024 09:48:08 +0100 Subject: [PATCH] chore: middleware typo --- providers/vite_provider.ts | 4 ++-- src/{middlewares => middleware}/vite_middleware.ts | 0 tests/backend/provider.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/{middlewares => middleware}/vite_middleware.ts (100%) diff --git a/providers/vite_provider.ts b/providers/vite_provider.ts index 868d9a0..d97ae48 100644 --- a/providers/vite_provider.ts +++ b/providers/vite_provider.ts @@ -11,7 +11,7 @@ import type { ApplicationService } from '@adonisjs/core/types' import { Vite } from '../src/vite.js' import type { ViteOptions } from '../src/types.js' -import ViteMiddleware from '../src/middlewares/vite_middleware.js' +import ViteMiddleware from '../src/middleware/vite_middleware.js' declare module '@adonisjs/core/types' { interface ContainerBindings { @@ -66,7 +66,7 @@ export default class ViteProvider { const server = await this.app.container.make('server') await vite.createDevServer() - server.use([() => import('../src/middlewares/vite_middleware.js')]) + server.use([() => import('../src/middleware/vite_middleware.js')]) } /** diff --git a/src/middlewares/vite_middleware.ts b/src/middleware/vite_middleware.ts similarity index 100% rename from src/middlewares/vite_middleware.ts rename to src/middleware/vite_middleware.ts diff --git a/tests/backend/provider.spec.ts b/tests/backend/provider.spec.ts index 4969e30..11e301a 100644 --- a/tests/backend/provider.spec.ts +++ b/tests/backend/provider.spec.ts @@ -10,7 +10,7 @@ import { IgnitorFactory } from '@adonisjs/core/factories' import { test } from '@japa/runner' import { defineConfig } from '../../index.js' -import ViteMiddleware from '../../src/middlewares/vite_middleware.js' +import ViteMiddleware from '../../src/middleware/vite_middleware.js' const BASE_URL = new URL('./tmp/', import.meta.url) const IMPORTER = (filePath: string) => {