Skip to content

Extends and standardize dependency message #1537

@ai

Description

@ai

result.messages.push({ type: 'dependency', file }) is a special API for plugin developers to tell about used files to PostCSS runner. The most popular way to use it is a watch mode.

But seems like we need to improve this message:

  1. Just the file path is not enough. For instance, postcss-mixins accept glob pattern.
  2. Seems like webpack’s css-loader needs more types: missing, build, context and regular dependencies. I do not like separated types like build-dependency. I think it will be better to use { type: 'dependency', build: true }

Questions:

  1. @mischnic @RyanZim Can every runner support glob-pattern for file watch?
  2. @alexander-akait can you explain what is build/context/missed dependency? It maybe a good idea to use these messages in other builders too.

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