From e0ec9561a360880e6c3cf1662998e4bf98a0570e Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 10 Sep 2020 14:58:47 +0430 Subject: [PATCH] fix(local): remove baseUrl from provider options --- src/module.ts | 1 - src/providers/local/runtime.ts | 2 +- src/types.ts | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/module.ts b/src/module.ts index cc2da9170..3d582cf4e 100644 --- a/src/module.ts +++ b/src/module.ts @@ -40,7 +40,6 @@ async function ImageModule (moduleOptions) { if (options.providers.local) { options.providers.local = { dir: path.join(nuxt.options.srcDir, 'static'), - baseURL: '/_image/local', ...options.providers.local } } diff --git a/src/providers/local/runtime.ts b/src/providers/local/runtime.ts index d099d0cd7..08ef13606 100644 --- a/src/providers/local/runtime.ts +++ b/src/providers/local/runtime.ts @@ -8,6 +8,6 @@ export default { operations.push(`w_${modifiers.width}`) } const operationsString = operations.length ? operations.join(',') : '_' - return options.baseURL + '/_/' + operationsString + src + return '/_image/local/_/' + operationsString + src } } diff --git a/src/types.ts b/src/types.ts index 97e185e55..5d96d39f4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -27,8 +27,7 @@ export type ProviderStaticGenerator = (url: string) => void export type ProviderServerMiddleware = (req, res, next) => void export interface LocalOptions { - dir?: string, - baseURL?: string, + dir?: string } export interface GenerateOptions {