Skip to content

worse output than bun #94

@huseeiin

Description

@huseeiin

Describe the bug

input:

import { transformSync } from "esbuild" with { type: "macro" };

console.log(
  transformSync(
    `const hello = "world";
console.log({ hello });
`,
    { minify: true }
  ).code
);

unplugin-macros output (through vite):

console.log(
  { "code": 'const hello="world";console.log({hello});\n' }.code
);

bun output:

// a.ts
console.log(`const hello="world";console.log({hello});
`);

Reproduction

above

System Info

version: ^0.17.0

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions