Vue-loader: What's the difference between `scoped` and `module`?

Created on 6 Nov 2016  路  2Comments  路  Source: vuejs/vue-loader

AFAIK module uses css modules which also makes the styles locally scoped.

So what's the different of them? When should I use module over scoped?

All 2 comments

_scope_
Adds an attribute to the component identifier, as well as all the child components, as it adds a dependency on this attribute styles

It simulates classic scope where child elements, and parent can be to use the same classes, but can not use classes other components are not included in the zone of visibility.

_module as css-modules_ https://github.com/css-modules/css-modules
Completely isolates style classes, which prevents their use in other components (not intentionally)

Thank your for your interest in this project. I hope @PowerfulPony's explanation was helpful.

Anyways, your issue is a usage/support question, and the issue tracker is reserved exclusively for bug reports and feature requests.

We encourage you to ask it on the forum , Stack Overflow or on gitter and are happy to help you out there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lijialiang picture lijialiang  路  3Comments

amorphine picture amorphine  路  3Comments

ryanelian picture ryanelian  路  3Comments

flashios09 picture flashios09  路  3Comments

C0deZLee picture C0deZLee  路  3Comments