This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
css: function styles array returns css per component #145
Closed
Description
Might be related to this one: #106
Expected behavior
When using multiple Vue components I would expect the styles array to populate the styles from all the components used inside an app. I have the following configuration:
import vue from 'rollup-plugin-vue'
export default {
...
plugins: [
vue({
autoStyles: false,
compileTemplate: false,
css (style, styles, compiler) {
console.log(styles)
}
})
],
...
}
Actual behavior
The styles array only contains an object of the updated style from the particular component that was updated.
Ideally this would contain the styles from both the components right? Even if any of the two hasn't changed?
Steps to reproduce the behavior
- Create the root component with at least a styles tag and add some selectors/attributes
- Create a child component with at least a styles tag and some selectors/attributes
- Import the child component from the root component
- Update the styles in the child component. The styles array contains only one element with the updated styles from the child component.
- Update the styles in the root component.The styles array contains only one element with the updated styles from the rot component.