flowaccount / nx-plugins

Nx plugins built by FlowAccount team, helps deploy systems to the cloud
115 stars 34 forks source link

[BUG] scully-plugin-angular-delay - Angular 10 #37

Open etavener opened 4 years ago

etavener commented 4 years ago

Describe the bug I upgraded my Angular 9 app to Angular 10.

After doing a build with ng build --prod --stats-json

I got this error (this error didn't appear before):

Error: A stats-es2015.json is required for the 'delayAngular' plugin.
Please run 'ng build' with the '--stats-json' flag

I checked my dist folder and there was a stats.json file not a stats-es2015.json. I renamed the file to stats-es2015.json and the error disappeared.

I think you should just check for both files and use the one that exists and if neither exists show the error.

Check which provider is affected: [] AWS [] Azure [] Google Cloud Platform

Check which framework is affected: [x] Angular [] Nodejs [] Serverless [] Lambda [] Infrastructure as a code

Additional context Add any other context about the problem here.

etavener commented 4 years ago

Additionally, if you checked for stats.json first and if that doesn't exist check for stats-es2015.json and if neither exists show error. Then you could remove the need for a tsConfig and it's path.

wickstargazer commented 4 years ago

i have to look into tsconfig requirement, however the stats.json is a valid point. We can check both to have backward compatibility :) ...

wickstargazer commented 4 years ago

looked into it quickly, we could make a regex expression for stats.json and remove tsconfig entirely ans you suggest :D

etavener commented 4 years ago

Sounds great.