Open mrzewnicki opened 3 months ago
Hi,
Problem occurs during minification of js file from external library. We are aware the import and export words are reserved keyword but we aren't able to change it in every new version of library files.
Code to reproduce:
var result = Uglify.Js(@"class bug { export() { console.log('omg'); } import() { console.log('omg'); } }"); Console.WriteLine(result.HasErrors); Console.WriteLine(result.Code); Console.WriteLine(string.Join(", ", result.Errors.Select(e => e.Message))); Console.ReadLine();
Result:
True class bug{export(){console.log("omg")}import(){console.log("omg")}} Expected identifier: export, Expected identifier: import
Looks like it doesnt support overwriding the export and import keywords. should be a simple fix
export
import
Hi,
Problem occurs during minification of js file from external library. We are aware the import and export words are reserved keyword but we aren't able to change it in every new version of library files.
Code to reproduce:
Result: