Skip to content

Importing with a type attribute of "css" is not supported #3792

Closed
@anilkumarum

Description

Chrome v126 is removed support for assert keyword and replace by with
I import css file and run in Chrome. cssStyleSheet imported and Chrome don't throw any error

import styleCss from "./style.css" with { type: "css" };

When I try to build

esbuild style.js --bundle --minify --target=chrome123 --outfile=build/style.js --format=esm

esbuild throw error

✘ [ERROR] Importing with a type attribute of "css" is not supported

    style.js:1:48:
      1 │ import styleCss from "./style.css" with { type: "css" };

When i use with keyword to import json. esbuild import json file and doesn't throw any error.
Please fix this issue ASAP
Thanks for your efforts

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions