Skip to content

Error when using css variables without semi. #3373

Closed
@honkinglin

Description

@honkinglin

Hey,I found it will parse error when I import a css like this:
import './test.css'

// test.css
.test {
    --animate-margin-top: -30px;
    --animate-transform-vertical: top
}

the error detail is:

ERROR in ./src/test.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
    --animate-transform-vertical: top
}

Unrecognised input. Possibly missing opening '{'
......

I know it's not a good idea to leave CSS without a semicolon at the end,but it is normal in the [email protected] version,so it kind of confused me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions