Open mcmcclur opened 1 week ago
You should definitely sanitize this comment if your boss can view source, but IMO it is not framework's business to do so. If you write a post-processor that strips comments, make sure to keep Framework's own comments, which are used as anchors for dynamic “cells” (e.g. <!--:55cc50bc:-->
).
Hi Fil, thanks!
I guess I was surprised to see the comments in production code for efficiency purposes, rather than for privacy. That is, it seems to be standard practice to not only clean comments but to also minimize and bundle production code to reduce transfer time and provide a snappier user experience.
I'm sorry if I wasn't clear on the motivation for the question.
Framework bundles and the css and js files coming from npm and node modules, but leaves the code blocks and HTML intact in the pages and js imports (edited). I can see how it could be useful to minimize those too on build. Maybe do not close this issue, but retitle it :)
Framework bundles and minifies its css and js files, but leaves the code blocks and HTML intact
That does not seem to be the case. Certainly, the code that it links from jsDelivr is minimized but, as far as I can tell, Javascript files written by the app author are not. For example:
I did reopen and retitle the project.
Ah you're right—currently only the npm/node modules are minified.
I notice that comments, either in code or in markdown of a Framework project, are preserved in the output that appears in
dist
after build. Thus, if myindex.md
file looks like so:Then I might lose my job. :(
So, should comments be sanitized in a build?