Angular 自定义Alyle UI组件样式

Angular 自定义Alyle UI组件样式,angular,build,production,Angular,Build,Production,我正在使用这个组件,在本地开发环境中一切都很好。但是当我们使用--prodbuild将代码部署到生产环境中时,我们的自定义样式停止工作了 @alyle/ui@的版本:^10.3.0 $node\u modules/.bin/ng--版本 角度CLI:10.1.6 节点:12.18.3 操作系统:win32 x64 角度:10.1.5 ... 动画、通用、编译器、编译器cli、核心、表单 ... 平台浏览器,平台浏览器动态,路由器 常春藤:是的 软件包版本 --------------------

我正在使用这个组件,在本地开发环境中一切都很好。但是当我们使用
--prod
build将代码部署到生产环境中时,我们的自定义样式停止工作了

@alyle/ui@
的版本:^10.3.0

$node\u modules/.bin/ng--版本
角度CLI:10.1.6
节点:12.18.3
操作系统:win32 x64
角度:10.1.5
... 动画、通用、编译器、编译器cli、核心、表单
... 平台浏览器,平台浏览器动态,路由器
常春藤:是的
软件包版本
---------------------------------------------------------
@角度devkit/architect 0.1001.6
@角度开发套件/构建角度0.1001.6
@角度devkit/核心10.1.6
@角度devkit/示意图10.1.6
@角度/cdk 10.2.4
@angular/cli 10.1.6
@角度/材料10.2.4
@示意图/角度10.1.6
@示意图/更新0.1001.6
rxjs 6.6.3
打字稿3.9.7
我从页面中的示例中复制了大部分代码:

const STYLES = (_theme: ThemeVariables, ref: ThemeRef) => {
  ref.renderStyleSheet(SLIDER_STYLES);
  const slider = ref.selectorsOf(SLIDER_STYLES);
  return {
    cropper        : lyl`{
      max-width: 238px
      height: 238px
    }`,
    sliderContainer: lyl`{
      position: relative
      ${slider.root} {
        margin: auto
        display : block
      }
    }`,
    slider         : lyl`{
      padding: 1em
    }`,
    cropResult     : lyl`{
      border-radius: 50%
    }`
  };
};
使用此html

<div ly-dialog-content [lyPx]="0" class="custom-cropper">
  
  <div class="title-cropper">
    Crop Image and Upload
    <!-- <button *ngIf="ready" ly-button color="primary" (click)="dialogRef.close()">X</button> -->
    <button mat-raised-button *ngIf="ready" color="primary" class="container__close-icon close-icon" (click)="dialogRef.close()">
    </button>
  </div>

  <ly-img-cropper [withClass]="classes.cropper"
                  [config]="myConfig"
                  [(scale)]="scale"
                  (ready)="ready = true"
                  (cleaned)="ready = false"
                  (minScale)="minScale = $event"
                  (cropped)="onCropped($event)"
                  (loaded)="onLoaded($event)"
                  (error)="onError($event)"
  >
    <span>Drag and drop image</span>
  </ly-img-cropper>

  <div *ngIf="ready" [className]="classes.sliderContainer">
    <div [class]="classes.slider">
      <ly-slider
        [thumbVisible]="false"
        [min]="minScale"
        [max]="1"
        [(ngModel)]="scale"
        (input)="scale = $event.value"
        step="0.000001"></ly-slider>
    </div>
  </div>

</div>

裁剪图像和上传
拖放图像
我添加了
定制裁剪器
类,这样我的同事就可以根据需要设计组件的样式,这在开发环境中运行得很好,但在我们将代码部署到生产环境
--prod
之后,这个定制样式就停止了工作

例如,我的本地开发运行有以下类:
lyimagecrapper root af crapper ab
,但prod运行有以下类:
af ab
??这完全弄乱了
.custom crapper
类提供的样式

文档中没有任何帮助。我还在githup回购协议中创建了一个问题


我在这里遗漏了什么?

你找到解决方案了吗?@johannesMatevosyan nope,没有办法,你只需要像示例一样定义代码中的所有样式。文档中有一个关于它的部分。你找到解决方案了吗?@johannesMatevosyan nope,没有办法,你只需要像示例一样定义代码中的所有样式。文档中有一节是关于它的。