akanix42 / vue-css-modules

MIT License
2 stars 1 forks source link

Get errot #1

Open thearabbit opened 6 years ago

thearabbit commented 6 years ago
<template>
    <div>
        <h2>Welcome to Accounting!</h2>
    </div>
</template>

<script>
    export default {
        name: 'Home',
        mounted(){
          console.lo.log(this.$style.red);
        },
        methods: {}
    };
</script>

<style module>
    /* Will only be applied to this component <a> elements */
    .red {
        color: red;
    }
</style>

Get error

While building for web.browser:
   imports/modules/acc/client/pages/Home.vue:20: [vue-component] Error while compiling css modules in tag <style>
   Cannot read property 'compiler' of undefined
akanix42 commented 6 years ago

It seems that there is sometimes an error when running this plugin without nathantreid:css-modules installed. The workaround is to install nathantreid:css-modules. To fix this, I'll have to work on extracting the compiler into a separate package that both plugins can reference.

thearabbit commented 6 years ago

Thanks, I will try install nathantreid:css-modules.