Jump to content
Search Community

gdav

Premium
  • Posts

    3
  • Joined

  • Last visited

Everything posted by gdav

  1. gdav

    Failed to Minify

    @GreenSock Thank you very much for the hint with the Power replacements. Now my imports are clean and everything is working as expected. Example imports: import {TimelineMax} from "gsap/TimelineMax"; import {TweenMax} from "gsap/TweenMax"; import {Back, Linear} from "gsap/EasePack"; With Webpack 4 no additional "const" hacks to avoid tree shaking side effects are needed. Greensocks / GSAP related dependencies in package.json "@types/gsap": "^1.19.2", "gsap": "^2.0.1", With this imports and packages react + typescript + gsap is running very well.
  2. gdav

    Failed to Minify

    Hi, Sorry for jumping in, but I have a maybe directly related issues detected. I have a project setup of: - React 16.4.0 - Typescript 2.8.3 - gsap 2.0.1 (types 1.19.2) - Webpack 4.10.2 The react stuff is written in typescript as TS / TSX files. I tried to get it working but I had multiple resolution problems. GSAP is installed as NPM module. Only working version based on 2.0.1 and prior is: import {TimelineMax} from "gsap/TimelineMax"; import {TweenMax} from "gsap/TweenMax"; import {Back, Linear, Quad, Quint} from "gsap/umd/EasePack"; In case I use gsap/EasePack instead of umd it will compile fine, but as soon as I try to run my application in browser, I will get errors like: During runtime. Easing packages have auto complete as usual and compiler reports no errors. In case I try to avoid mixing umd and none umd files by loading all classes from umd directory, I get errors during runtime like: It looks for me like something went wrong during static exports of EasePack. For the moment mix of none umd for usual stuff and umd for easing package will fix the issues, but the solution is not elegant. By the way, Webstorm import resolution is not really working well with the current gsap structure
  3. Hi, some general hints from my experience, because your demo is not longer available: GIF animations are rendered via the browser render core engine, this is not very efficient. Also a GIF will be rendered by the browser core if it is not in the viewport or hidden. Avoid hiding (alpha) or display:none for GIFs, remove them completely from the DOM, if they should not be shown. Also try to optimize your GIF, so the render changes between each frame is reduced. In general from my experiences: avoid large GIF files if possible, do not use alpha transparency if not really needed. Also try other programs as Photoshop to generate the GIF files, or optimize it with other tools, Photoshop creates (in most cases) GIFs with a large overhead. Hope that helps
×
×
  • Create New...