【问题标题】:BundleConfig retuns error on trying to minify @keyframesBundleConfig 在尝试缩小 @keyframes 时返回错误
【发布时间】:2020-08-17 21:41:23
【问题描述】:

我有使用关键帧的 scss 脚本。

BundleConfig 然后在尝试缩小生成的 css 时返回错误:

Minification failed. Returning unminified contents.
(8,9984): run-time error CSS1019: Unexpected token, found '}'

这是由于这两行:

@-webkit-keyframes adjust-hue {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes adjust-hue {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

如何修复它以便缩小工作?

【问题讨论】:

  • 有人可以帮忙吗?

标签: sass css-animations bundling-and-minification


【解决方案1】:

我通过在 webpack 中进行所有捆绑和缩小来解决这个问题,然后在 BundleConfig 中只捆绑准备好的缩小 css 文件。这在没有产生错误的情况下工作。

【讨论】:

    猜你喜欢
    • 2015-11-18
    • 1970-01-01
    • 2021-04-14
    • 1970-01-01
    • 2021-04-12
    • 2017-07-17
    • 2012-10-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多