Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Why style.module attr is required when using vue({ css: false })? #186

Closed
andriilahuta opened this issue May 6, 2018 · 1 comment
Closed

Comments

@andriilahuta
Copy link

Styles without module attr are filtered out when { css: false }, which breaks scopeId injection into template.
Relevant piece of code:

if (shouldExtractCss) {
input.styles = input.styles
.map((style, index) => {
descriptor.styles[index].code = style.code
input.script.code +=
'\n' +
`import '${createVuePartRequest(
filename,
'css',
'styles',
index
)}'`
if (style.module) {
return { ...style, code: '' }
}
})
.filter(Boolean)
}

@znck
Copy link
Member

znck commented May 6, 2018

Oh! We have to take care of scoped styles too. 👏 Nice catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants