-
Notifications
You must be signed in to change notification settings - Fork 111
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
Minimize code during build #1502
Comments
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. |
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 :) |
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?
The text was updated successfully, but these errors were encountered: