Skip to content

Multiple configuration rules #1

@sambedingfield

Description

@sambedingfield

Thanks for the great plugin - especially to fix vitejs/vite#3924 when using lazy loaded components in Vite.

What's the preferred way to handle multiple rules, if possible?

To avoid another config I have my postcss set in my vite.config, which has to use the Array formatting, and this seems to work.

postcss: {
  plugins: [
    require('postcss-assign-layer')({
      include: '**/styles/**.{css,scss}',
      layerName: 'base',
    }),
    require('postcss-assign-layer')({
      include: '**/components/**/*.{css,scss}',
      layerName: 'components',
    }),
    require('postcss-assign-layer')({
      include: '**/templates/**.{css,scss}',
      layerName: 'templates',
    }),
  ]      
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions