Currently, I am immersed in a project involving Angular 4 and TypeScript. Recently, I came across a video showcasing how VSCODE can enhance the code's appearance. Intrigued, I installed the prettier
plugin to achieve the same effect. Running this tool on my script file made the code more presentable and easier to read. However, one drawback was that it significantly increased the number of lines of code.
For instance, if I had initially written an input as:
let input = {"root": {"firstname":input.firstname , "lastname": input.lastname , "mobilenumber": input.mobile}};
After applying prettier
, the same input transformed into multiple lines of code:
let input = {
"root":{
"firstname":input.firstname ,
"lastname": input.lastname ,
"mobilenumber": input.mobile,
}
};
This expansion resulted in about 6 to 7 lines of code being generated.
I'm wondering whether this increase in file size is due to each property appearing on a new line similar to pressing 'ENTER'?
The reason for my inquiry stems from encountering memory errors during the build process post this modification. Additionally, I am concerned whether this will elevate the memory usage on the page, given that most pages are approximately 40 to 50 MB based on my inspection using Chrome dev tools and heap snapshots.