vuetify-module icon indicating copy to clipboard operation
vuetify-module copied to clipboard

Progressive Images not working as of 1.11.3

Open SugarF0x opened this issue 4 years ago • 0 comments

Module version 1.11.3

Describe the bug

Vuetify treeshake progressive image module not working

To Reproduce

https://github.com/SugarF0x/vuetify-preload

Steps to reproduce the behavior:

  1. Run npm create-nuxt-app with Vuetify & TS selected
  2. Modify nuxt-config.js to enable Vuetify Progressive Image loading
export default {
  //
  vuetify: {
    treeShake: {
      loaderOptions: {
        progressiveImages: {
          size: 16,
          sharp: true,
          resourceQuery: /preload/
        }
      }
    }
  }
  //
}
  1. Modify package.json to use nuxt instead of nuxt-ts in it's scripts
  2. Require an image from assets
  3. Get path to image just as you would without progressiveImage loading

Expected behavior

Asset image request e.g. require('~/assets/image.jpg') is to return an object containing both source image path and minified version

Additional context

Progressive Images is not working at all when running nuxt instead of nuxt-ts. When running nuxt-ts, however, the loader option does register, yet none of it's options are passed through falling back to defaults + several Vuetify modules are missing resulting in a build error. Installing Nuxt with JS instad of TS does not help.

Sticking to Nuxt 1.15.2 but falling back to Vuetify 1.11.2 does help, but you can't run nuxt instead of nuxt-ts since Vuetify relies on it in 1.11.2

SugarF0x avatar Mar 03 '21 10:03 SugarF0x