primeflex icon indicating copy to clipboard operation
primeflex copied to clipboard

How to use Primeflex with Dart SASS?

Open muuvmuuv opened this issue 1 year ago • 1 comments

When building with Vite/esbuild in Angular new application builder, this import is deprecated and any further @include on primeflex mixins wont work. New Dart SASS uses @use now.

@import "primeflex/primeflex";
.p-card {
  .p-card-header,
  .p-card-body {
    @include style-class("px-4 pt-4");
  }
}
Application bundle generation failed. [0.520 seconds]
✘ [ERROR] Undefined mixin.
  ╷
6 │     @include style-class("px-4 pt-4");
  │     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src/theme/_overrides.scss 6:5  @import
  src/theme/main.scss 13:9       root stylesheet [plugin angular-sass]

    angular:styles/global:styles:4:8:
      4 │ @import 'src/theme/main.scss';

muuvmuuv avatar Jan 18 '24 08:01 muuvmuuv

My bad, wrong mixing, this works:

@use "primeflex/core/_utils" as *;

Still a bit hacky.

This would look better:

@use "primeflex/utils" as *;

muuvmuuv avatar Jan 18 '24 08:01 muuvmuuv