AjiTae / vue-implicit-css-modules

Implicitly replace class names using Vue css modules
1 stars 1 forks source link

Not working on third party components #1

Open edum18 opened 3 years ago

edum18 commented 3 years ago

Hey @AjiTae I've enabled "unsafe" but still doesn't transform class names on third party components. Any idea why?

main.js:

import VueImplicitCssModules from 'vue-implicit-css-modules';
import globalModule from './assets/styles/main.scss';

Vue.use(VueImplicitCssModules, {
    global: globalModule,
    unsafe: true
})

vue.config.js:

module.exports = {
    css: {
        requireModuleExtension: false,
        loaderOptions: {
            css: {
                modules: {
                    localIdentName: 'QUALITY__[local]'
                }
            }
        }
    }
}
edum18 commented 3 years ago

I ended up using shadow dom, as an alternative to css modules to encapsulate css