Skip to content
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

Lazy load sentry only on errors #409

Merged
merged 7 commits into from
Nov 9, 2024
Merged

Lazy load sentry only on errors #409

merged 7 commits into from
Nov 9, 2024

Conversation

paskal
Copy link
Collaborator

@paskal paskal commented Oct 31, 2024

Copy link

cloudflare-workers-and-pages bot commented Oct 31, 2024

Deploying radio-t-site with  Cloudflare Pages  Cloudflare Pages

Latest commit: 63efc2a
Status: ✅  Deploy successful!
Preview URL: https://14543948.radio-t-site.pages.dev
Branch Preview URL: https://paskal-lazy-load-sentry.radio-t-site.pages.dev

View logs

@paskal paskal force-pushed the paskal/lazy-load-sentry branch 2 times, most recently from d00b5eb to 4ec8149 Compare November 1, 2024 23:01
Copy link

github-actions bot commented Nov 1, 2024

Site Build Comparison

Build completed at: 2024-11-09 20:38:57 UTC

Changed files:

- Modified: `build/vendor.js`
- Modified: `build/manifest.js`
- New: `build/vendor~sentry.js`
- Modified: `build/app.js`

View full changes diff

@paskal paskal force-pushed the paskal/lazy-load-sentry branch 4 times, most recently from 5b9c84b to 01adfbd Compare November 2, 2024 12:52
@akellbl4
Copy link
Collaborator

akellbl4 commented Nov 8, 2024

Разница в размере файлов в бандле настораживает

hugo/src/js/sentry.js Outdated Show resolved Hide resolved
@akellbl4
Copy link
Collaborator

akellbl4 commented Nov 8, 2024

Подозреваю что проблема может быть в настройках бандлера и его версии. Старые версии webpack не очень хорошо поддерживают сплит по чанкам при использовании асинхронных импортов.

@paskal paskal force-pushed the paskal/lazy-load-sentry branch from 01adfbd to 4288ff8 Compare November 8, 2024 23:31
@paskal paskal marked this pull request as ready for review November 8, 2024 23:57
@paskal paskal requested a review from akellbl4 November 8, 2024 23:57
hugo/src/js/sentry.js Outdated Show resolved Hide resolved
hugo/src/js/app.js Outdated Show resolved Hide resolved
@paskal paskal force-pushed the paskal/lazy-load-sentry branch from 4288ff8 to 4efe564 Compare November 8, 2024 23:59
@radio-t radio-t deleted a comment from github-actions bot Nov 9, 2024
Copy link

github-actions bot commented Nov 9, 2024

size-limit report 📦

Path Size
static/build/app.js 19.59 KB (+2.34% 🔺)
static/build/manifest.js 1.48 KB (+79.53% 🔺)
static/build/vendor.js 104.64 KB (-17.01% 🔽)
static/build/app.css 7.24 KB (0%)
static/build/app-dark.css 7.29 KB (0%)
static/build/vendor.css 5.97 KB (0%)
static/build/vendor-dark.css 6.01 KB (0%)
static/build/vendor~sentry.js 104.89 KB (+100% 🔺)

@akellbl4
Copy link
Collaborator

akellbl4 commented Nov 9, 2024

@paskal size-limit job выходит с error 1, при этом в отчете все проверки passed. Поэтому можно на него не смотреть.

  • добавил отдельный чанк
  • обновил лимиты (скорее всего размер увеличился после обновлений)
  • починил quicklink (после обновления на новую версию нужно было обновить код)
  • поправил ридми

@paskal
Copy link
Collaborator Author

paskal commented Nov 9, 2024

Проблема вот тут:

  {
    "name": "static/build/app.js",
    "passed": false,
    "size": 20060
  },
  {
    "name": "static/build/manifest.js",
    "passed": false,
    "size": 1517
  },
  {
    "name": "static/build/vendor.js",
    "passed": false,
    "size": 107153
  },
  {
    "name": "static/build/vendor~sentry.js",
    "passed": false,
    "size": 107409
  },

Нужно повысить лимиты

@paskal paskal merged commit fb2afe6 into master Nov 9, 2024
10 checks passed
@paskal paskal deleted the paskal/lazy-load-sentry branch November 9, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Загружать sentry только если произошла ошибка
2 participants