vuetifyjs / vue-cli-plugins

🔌 A collection of Vuetify plugins for Vue CLI
https://vuetifyjs.com/en/getting-started/quick-start#vue-cli-3
Other
428 stars 113 forks source link

fix: merge `transformAssetUrls` options #216

Closed Seminioni closed 3 years ago

Seminioni commented 3 years ago

Hi guys.

I'm using vuetify via vue-cli-plugin-vuetify at work.

Yesterday I added @yzfe/svgicon plugin for using *svg as vue' component and noticed that usage over docs' example doesn't work (see https://mmf-fe.github.io/svgicon/en/guide/#usage). It simply didn't load svg over <icon data="@icon/arrow.svg" /> method.

<template>
    <div>
        <!-- It is assumed that the alias of the svg file path is configured: @icon  -->
        <icon data="@icon/arrow.svg" />
    </div>
</template>

@icon is configured alias at .vue-svgicon.config.js config of @yzfe/svgicon plugin.

I tried to install @yzfe/svgicon plugin in newly created vue project over vue create project-name and it worked. Then I installed vuetify over vue add vuetify command and icon plugin stoped working.

After some time spent for researching I discovered that yours vue-loader' config doesn't merge transformAssetUrls' settings but wiped assigned before setting of others plugins.