Closed Toilal closed 7 years ago
Hmm, I actually want to keep this query trick as minimum as possible since this seems to be non-standard implementation. Also this can be complex and unreadable code easily if we allow more options for that place.
What is the use case of this option? I personally think, it would be enough to use plain style-/css-loader if we want non-scoped style.
I see.
My idea is to have as much as possible the same capabilities that when using .vue
single-file components with vue-loader
. It's used to emulate the scoped
attribute of <style>
tag from single-file components.
I've rethought about this but I still have no idea of valid usage. It looks clearer just importing .css
files directly if we want non-scoped styles. And I think we can cover the vue-loader
's functionality with such approach.
Import css files directly:
import withRender from './template.html'
import './global.css'
Introducing scoped
on query:
import withRender from './template.html?scoped=true&./global.css'
So I'm closing this issue. Thanks for your suggestion and PR, though!
It would be great to allow setting scoped property on a template basis, inside the import statement.
I think something like this could do the trick: