Skip to content

Commit

Permalink
feat: support NUXT_IMAGE_PROVIDER environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 16, 2020
1 parent a89aabe commit 1385eb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ async function imageModule (moduleOptions: ModuleOptions) {
const { nuxt, addServerMiddleware, addPlugin } = this

const options: ModuleOptions = {
provider: 'local',
providers: {}, // user custom providers
presets: [],
intersectOptions: {},
sizes: [320, 420, 768, 1024, 1200],
...nuxt.options.image,
...moduleOptions
}
options.provider = process.env.NUXT_IMAGE_PROVIDER || options.provider || 'local'

const pluginOptions = {
sizes: options.sizes,
Expand Down

0 comments on commit 1385eb8

Please sign in to comment.