Skip to content

Config for transformAssetUrls in Nuxt.js outdated #3521

Closed
@JosephTico

Description

@JosephTico

Describe the bug

Using the latest version of the libraries, it seems that the transformAssetUrls config for Nuxt.js is either outdated or has some wrong parameters.

The docs page for this has the following code, which I assume is the same automatically added from v2.0.0-rc.22 onwards:

module.exports = {
  build: {
    extend(config, ctx) {
      const vueLoader = config.module.rules.find(rule => rule.loader === 'vue-loader')
      vueLoader.options.transformAssetUrls = {
        video: ['src', 'poster'],
        source: 'src',
        img: 'src',
        image: 'xlink:href',
        'b-img': 'src',
        'b-img-lazy': ['src', 'blank-src'],
        'b-card': 'img-src',
        'b-card-img': 'img-src',
        'b-card-img-lazy': ['src', 'blank-src'],
        'b-carousel-slide': 'img-src',
        'b-embed': 'src'
      }
    }
  }
}

However, b-card-img doesn't use img-src, it uses plain src. There may be other cases of wrong parameters, but this is the one I just found.

Versions

Libraries:

  • BootstrapVue: 2.0.0-rc.23
  • Bootstrap: 4.3.1
  • Vue: 2.6.10
  • Nuxt: 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions