Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

Incompatible with rollup-plugin-vue 5.1.6 #105

Open
freblast opened this issue Feb 10, 2020 · 4 comments
Open

Incompatible with rollup-plugin-vue 5.1.6 #105

freblast opened this issue Feb 10, 2020 · 4 comments
Labels
Type: Improvement Includes backwards-compatible fixes

Comments

@freblast
Copy link

When using latest rollup-plugin-vue (5.1.6) the custom block outputs "customBlock.0.json" instead of "i18n.0.json" which causes the test in this plugin to fail.

@kazupon
Copy link
Member

kazupon commented Feb 10, 2020

Could you provide minimum reproduction codes, please?

@Mertico
Copy link

Mertico commented Mar 18, 2020

Update to rollup-plugin-vue (5.1.6) and run unit test

Maybe not work after this change
Diff 5.1.4...master

here
https://github.com/intlify/rollup-plugin-vue-i18n/blob/master/src/index.ts#L11

ID rollup 5.1.4
.vue?rollup-plugin-vue=i18n.0.json
before update 5.1.6
.vue?rollup-plugin-vue=customBlocks.0.json

Before
replace
<i18n lang="json">
To
<i18n>

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

And
replace plugin transform
if (/rollup-plugin-vue=i18n/i.test(id)) {
To
if (/rollup-plugin-vue=.*i18n/i.test(id)) {
Doesn't add i18n code

@kazupon
Copy link
Member

kazupon commented Mar 18, 2020

@Mertico
Thank you for your easy to understand explanation!

As well as rollup-plugin-vue, we need to change rollup-plugin-vue-i18n.

@Mertico
Copy link

Mertico commented Mar 18, 2020

@kazupon
Do not do without editing rollup-plugin-vue via generating ids
vuejs/rollup-plugin-vue#333

@kazupon kazupon transferred this issue from intlify/rollup-plugin-vue-i18n Jul 4, 2021
@kazupon kazupon transferred this issue from intlify/bundle-tools Jul 4, 2021
@kazupon kazupon added the Type: Improvement Includes backwards-compatible fixes label Jul 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Improvement Includes backwards-compatible fixes
Projects
None yet
Development

No branches or pull requests

3 participants