Skip to content

Collapse inlined variables into templates #13233

Open
@benmccann

Description

@benmccann

Describe the problem

In #13075 we generate code like:

const x = "foo";
$.template(`hello ${x}`);

It would be nicer if this were simply:

$.template(`hello foo`);

Describe the proposed solution

Ideally this is implemented by esbuild (evanw/esbuild#3570) and Oxc (oxc-project/oxc#2646). Failing that, we may have to implement it ourselves

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions