mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): skip vue style blocks in unctx transform (#26059)
This commit is contained in:
parent
8e6d2306c0
commit
4fbbc10f62
@ -17,7 +17,7 @@ export const UnctxTransformPlugin = createUnplugin((options: UnctxTransformPlugi
|
|||||||
name: 'unctx:transform',
|
name: 'unctx:transform',
|
||||||
enforce: 'post',
|
enforce: 'post',
|
||||||
transformInclude (id) {
|
transformInclude (id) {
|
||||||
return isVue(id) || isJS(id)
|
return isVue(id, { type: ['template', 'script']}) || isJS(id)
|
||||||
},
|
},
|
||||||
transform (code) {
|
transform (code) {
|
||||||
// TODO: needed for webpack - update transform in unctx/unplugin?
|
// TODO: needed for webpack - update transform in unctx/unplugin?
|
||||||
|
2
test/fixtures/basic/pages/styles.vue
vendored
2
test/fixtures/basic/pages/styles.vue
vendored
@ -18,6 +18,8 @@ import '~/assets/assets.css'
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* Regression test for https: //github.com/nuxt/nuxt/issues/26057 */
|
||||||
|
/* definePageMeta( */
|
||||||
div {
|
div {
|
||||||
--scoped: 'scoped';
|
--scoped: 'scoped';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user