【发布时间】:2021-12-31 02:28:55
【问题描述】:
尝试用 Angular 构建新库
ng build some-lib --configuration development
一切正常
但是当我向组件添加一些样式时,示例中默认没有提供
@Component({
selector: 'lib-some-lib',
templateUrl: "./some-lib.component.html",
styleUrls: ["./some-lib.component.scss",] // <- by default nothing here
})
export class SomeLibComponent {
}
我看到下一个错误:
Building Angular Package
------------------------------------------------------------------------------
Building entry point 'some-lib'
------------------------------------------------------------------------------
⠋ Compiling with Angular sources in Ivy full compilation mode.Compiling @angular/core : es2015 as esm2015
⠸ Compiling with Angular sources in Ivy full compilation mode.Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.11, but postcss-preset-env uses 7.0.39. Perhaps this is the source of the error below.
✖ Compiling with Angular sources in Ivy full compilation mode.
Unknown version 15.1 of safari
【问题讨论】: