In snowpack it is not clear how to enable css modules for .vue files using the module attribute.
Usage example:
<template>
<div :class="$style.App"></div>
</template>
<style lang="scss" module>
.App {
text-align: center;
}
</style>
Using the above with snowpack the app throws an error in the browser:
TypeError: Cannot read property 'App' of undefined
at Proxy.render (App.js?mtime=1591252156733:15)
at renderComponentRoot (vue.js:1362)
at componentEffect (vue.js:4140)
at reactiveEffect (vue.js:297)
at effect (vue.js:272)
at setupRenderEffect (vue.js:4132)
at mountComponent (vue.js:4091)
at processComponent (vue.js:4048)
at patch (vue.js:3711)
at render (vue.js:4810)
Vue-loader for webpack allows this behaviour see docs.