Skip to content

[Bug]: CSS: @value replacement in keyframes/animation produces broken output #15612

Description

@Knagis

System Info

rspack 2.2.3

Details

@value replacement for animation + @keyframes produce broken output:

===== input =====
@value animName: pulseAnim;

.anim {
    animation: animName 2s linear;
}

@keyframes animName {
    from { opacity: 0; }
}

===== rspack (native css/module) output =====
.css-modules-value-animation-src_index_css-anim {
    animation: pulseAnim 2s linear;
}

@keyframes css-modules-value-animation-src_index_css-animName {
    from { opacity: 0; }
}

note - webpack native css also has an issue, though with different output: webpack/webpack#22030

Reproduce link

https://github.com/Knagis/rspack-webpack-css-value-animation

Reproduce Steps

npm install
npm run build

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions