Skip to content
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
mdings opened this issue Oct 18, 2017 · 1 comment
Closed

css: function styles array returns css per component #145

mdings opened this issue Oct 18, 2017 · 1 comment
Labels

Comments

@mdings
Copy link

mdings commented Oct 18, 2017

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

  1. Create the root component with at least a styles tag and add some selectors/attributes
  2. Create a child component with at least a styles tag and some selectors/attributes
  3. Import the child component from the root component
  4. Update the styles in the child component. The styles array contains only one element with the updated styles from the child component.
  5. Update the styles in the root component.The styles array contains only one element with the updated styles from the rot component.
@znck
Copy link
Member

znck commented May 2, 2018

The CSS handling approach is changed now.

Related #184

@znck znck closed this as completed May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants