Skip to content

When using inject option, import specifier is not escaped even when needed #6777

@sapphi-red

Description

@sapphi-red

REPL

// rolldown.config.ts
import { defineConfig } from 'rolldown' 
export default defineConfig({
  transform: {
    inject: {
      'a': 'foo"',
    },
  }
})

Input

console.log(a)

Actual

import a from "foo"";

console.log(a);

Expected

import a from "foo\"";

console.log(a);

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