-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why use prettier? #23
Comments
Hey! It was mainly just done as a quick fix to make sure the output was readable and formatted correctly, I think it could be swapped out for something simpler like https://github.com/dmnd/dedent or maybe there's even a webpack helper function to do it? Would happily accept a PR to improve this! |
Cool, I'll take a look and come back with a proposal! |
Prettier makes up 99.4% of this packages overall size |
@thomaswelton will this also bloat the production code or only in development? Not sure how much overhead this plugin would add right now - I don't want to ship prettier to the final product |
The plugin doesn't bundle prettier inside your apps code, it's just installed in your node_modules, the only benefit to swapping it out is to the developer for a slightly faster npm install time of the package, as well as taking up less space on the disk. |
@mattlewis92 thanks for clarification. So a no brainer, since prettier is installed anyway in my project :) |
Heroku has a slug size limit, and the slug includes node_modules. So relying on prettier does potentially impact more than just slightly faster npm install time and local disk space. Some of the teams I work with are bumping into the slug size limit. |
Hey Matt, love the idea here. I'm considering this for use and one question I had is: why run the async script / source script through prettier? Doesn't seem worth the tradeoff to me of needing a top-level dependency for prettier for code that will really only be read by the browser. Probably is some slight perf penalty too but haven't profiled it to know if it's meanginful. Thanks for in advance for entertaining my question!
The text was updated successfully, but these errors were encountered: