-
Notifications
You must be signed in to change notification settings - Fork 22
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
how can i remove comments like // or /* */ #44
Comments
Hi @boythl! Hmm.., this shouldn't be the case since comments are always removed even during the development and
precision highp float;
// First Chunk:
#include /test/glsl/chunk0.frag
out highp vec4 fragColor;
void main (void) {
fragColor = chunkFn();
}
/**
* Red Chunk:
*/
highp float chunkRed () {
return 0.0;
} And this is the output JS when building the project: (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const n of t.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function l(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?t.credentials="include":e.crossorigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=l(e);fetch(e.href,t)}})();var c="precision highp float;highp float chunkRed(){return 0.0;}highp float chunkGreen(){return 0.8;}highp vec3 chunkRGB(){return vec3(chunkRed(),chunkGreen(),0.0);}highp vec4 chunkFn(){return vec4(chunkRGB(),1.0);}out highp vec4 fragColor;void main(void){fragColor=chunkFn();}";const r=document.getElementById("app");console.info(`Shader Length: ${c.length} characters.`);r.style.backgroundColor="#222222";r.style.fontFamily="monospace";r.style.whiteSpace="pre-wrap";r.style.color="#bbbbbb";r.style.padding="16px";r.textContent=c;
//# sourceMappingURL=index-e08ad4dd.js.map As you can see, there are no comments in GLSL source code. So I guess I need to ask you to provide a minimal reproducible example with this issue. Thanks! |
sorry, it's my fault. can i suggest, give a notice in readme about please see here:
|
Yep, you're might be right, it's worth mentioning in Readme of this repo. Will add to my TODO list, thanks! |
hi guys, i have set
compress
totrue
in my vite.config.ts,but when i build the project, comments are still here; Eg:
something else i need to do?
thanks for ur help!
The text was updated successfully, but these errors were encountered: