Skip to content

Commit 8a83c65

Browse files
committed
fix(build): prevent styles leak to v9
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
1 parent 6ba0a2b commit 8a83c65

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

vite.config.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ const overrides = defineConfig({
9393
],
9494
},
9595
},
96+
modules: {
97+
// Make sure @nextcloud/vue v9 and @nextcloud/vue v8 have different scopes even for the same component code
98+
hashPrefix: '@nextcloud/vue@8',
99+
// hashPrefix only works when custom generateScopedName is set
100+
// Ref: https://github.com/madyankin/postcss-modules/blob/v6.0.1/src/scoping.js#L39
101+
generateScopedName: '_[local]_[hash:base64:5]',
102+
},
96103
},
97104
})
98105

0 commit comments

Comments
 (0)