Replies: 2 comments
-
Function and variable names can be minified at first glance, but if you do, api names such as |
Beta Was this translation helpful? Give feedback.
-
If you look closer, those are not function names but class methods or object properties. These are part of the public API and therefore cannot be mangled. Everything that's not part of the public API is already mangled by our build pipeline. |
Beta Was this translation helpful? Give feedback.
-
Hey I am using Preact with Vite and is this how a build looks like or is there any further optimization possible? I am having doubts since those function names look like they could be shortened but I am very new to topics like minification, building, etc and am not sure about how much is possible. Eg.
(e){e.call(n)}))}catch(r){t.__e(r,n.__v)}}))}function A(e,n,r){try{"function"==typeof e?e(n):e.current=n}catch(i){t.__e(i,r)}}function L(e,n,r){var i,o;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||A(i,null,n)),null!=(i=e.__c)){if**(i.componentWillUnmount)try{i.componentWillUnmount()**}catch(a){t.__e(a,n)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&L(i[o],n,r||"function"!=typeof e.type);r||null==e.__e||d(e.e),e.=e.e=e.d=void 0}function j(e,t,n){return this.constructor(e,n)}function x(n,r,i){var o,a,s,l;t.&&t.(n,r),a=(o="function"==typeof i)?null:i&&i.__k||r.__k,s=[],l=[],N(r,n=(!o&&i||r).__k=h(v,null,[n]),a||c,c,void 0!==r.ownerSVGElement,!o&&i?[i]:a?null:r.firstChild?e.call(r.childNodes):null,s,!o&&i?i:a?a.__e:r.firstChild,o,l),R(s,n,l)}function B(e,t){x(e,t,B)}function H(t,n,r){var i,o,a,s,c=f({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),n)"key"==a?i=n[a]:"ref"==a?o=n[a]:c[a]=void 0===n[a]&&void 0!==s?s[a]:n[a];return arguments.length>2&&(c.children=arguments.length>3?e.call(arguments,2):r),m(t.type,c,i||t.key,o||t.ref,null)}function W(e,t){var n={__c:t="cC"+s++,:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.e=!0,w(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.=n.Consumer.contextType=n}e=l.slice,t={e:function(e,t,n,r){for(var i,o,a;t=t.;)if((i=t.c)&&!i.)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(**i.componentDidCatch(**e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},n=0,g.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?
Beta Was this translation helpful? Give feedback.
All reactions