Skip to content

Build result have duplicate variable names #8058

@zzxming

Description

@zzxming

Reproduction link or steps

https://stackblitz.com/edit/github-apupsbr3?file=dist%2Findex.umd.js

What is expected?

the example have two files. index.ts export other files. I'm use the Quill constants variable in test.ts, and Test class have a argument quill.
When I build code to umd I got this:

(function(global, factory) {
 // ...
})(this, function(exports, quill) {
// ...
quill = __toESM(quill);

//#region src/test.ts
	var Test = class {
		constructor(quill) {
			this.quill = quill;
			console.log(quill.default.events);
		}
	};
/...

The quill.default.events shuold be Quill.events. and this makes my code to error.

I tried version 0.19.0 and everything worked fine.

What is actually happening?

Duplicate variable names cause errors

Any additional comments?

If I export the content of test.ts directly in index.ts, the result is correct.

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