Skip to content

Commit

Permalink
fix(local): remove baseUrl from provider options
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Sep 10, 2020
1 parent 62c8704 commit e0ec956
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/local/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export default <RuntimeProvider> {
operations.push(`w_${modifiers.width}`)
}
const operationsString = operations.length ? operations.join(',') : '_'
return options.baseURL + '/_/' + operationsString + src
return '/_image/local/_/' + operationsString + src
}
}
3 changes: 1 addition & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e0ec956

Please sign in to comment.