Web build pain

Web build pain

# Web building is painful experience

  • rollup is muc better that webpack
  • vite is the best
  • vite config is hard to find, read source, need vite --config or similar
  • own rollup build
    • test rollup.config.js

# Old iOS compatible build

  • terserOptions: { safari10: true }
  • dynamic import
  • testing where fails was very slow process, copyin non workin code and binary search (splitting from middle) was only solution I found, about 10 hours
  • main problem: ...toRefs(state), use return toRefs(state) or return Object.assign({ logout, login }, toRefs(state))
  • circular deps, do not call other modules on module init - do lazy load instead
  • tested polyfills, but iOS was quite modern
  • iOS debugging
    • connect iPad / iPhone with usb cable
    • safari connect is dimmed
    • brew install ios-webkit-debug-proxy
    • script: alias iosdebug="echo 'devtools://devtools/bundled/inspector.html?ws=localhost:9222/devtools/page/1 && ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html' && open -a 'Microsoft Edge' && ios_webkit_debug_proxy -f chrome-devtools://devtools/bundled/inspector.html"