Skip to content
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
@mdings

Description

@mdings

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions