vuejs / rollup-plugin-vue

Roll .vue files
https://vuejs.github.io/rollup-plugin-vue
MIT License
843 stars 148 forks source link

Wrong generating ids customBlocks #333

Open Mertico opened 4 years ago

Mertico commented 4 years ago

Version

5.0.0

Reproduction link

https://github.com/intlify/rollup-plugin-vue-i18n

Steps to reproduce

Clone https://github.com/intlify/rollup-plugin-vue-i18n install and update rollup-plugin-vue to 5.1.6

VuePlugin({
        customBlocks: ['i18n'],
      })

Generatered tag <i18n lang="json"></i18n>

?rollup-plugin-vue=customBlocks.0.json

tag <i18n></i18n>

?rollup-plugin-vue=customBlocks.0.i18n

and add default lang

VuePlugin({
        customBlocks: ['i18n'],
        defaultLang: {
          i18n: 'json'
        }
      })

tag <i18n></i18n> ?rollup-plugin-vue=customBlocks.0.json

What is expected?

maybe generated ids ?rollup-plugin-vue=customBlocks.<tagName>.<lang?>

What is actually happening?

Generate wrong ids

caxerx commented 4 years ago

any update on this issue?

spacedawwwg commented 3 years ago

I've just found this issue as I'm come across the same problem.

My custom block has multiple attributes (src, lang, target)

Is there a solution to use attributes on customBlocks @znck ?