Office-Add-in-samples icon indicating copy to clipboard operation
Office-Add-in-samples copied to clipboard

WARNING in entrypoint size limit

Open alexzhou-chata opened this issue 1 year ago • 7 comments

Note: This repo is only for questions related to its samples. If you have questions about how to use office.js or the Office developer platform, please post your question on https://stackoverflow.com. Tag your question with office-js or outlook-web-addins

Question

When I run npm run build on this sample, it give the below warning.

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  vendor (1.13 MiB)
      vendor.[fullhash].js
  app (1.33 MiB)
      app.[fullhash].js

Could you please improve this issue?

alexzhou-chata avatar Apr 24 '23 21:04 alexzhou-chata

Hi @alexzhou-chata,

Thank you for reporting this issue. I have a couple of follow-up questions:

  1. Which sample is this related to?
  2. Is this impacting any development based on the sample?

AlexJerabek avatar Apr 24 '23 21:04 AlexJerabek

Hi Alex,

I am so sorry that I didn't mention the specific sample. The sample is Office-Add-in-Microsoft-Graph-React

No, this doesn't impact anything except for when user has a lower speed internet, this bundle size will affect the loading speed. I built an app followed the sample and eventually had a chunk size more than 4MB, which is too large. So, I came back to this sample to test how large of the asset size and found the size also too large.

All the best, Alex Zhou

alexzhou-chata avatar Apr 25 '23 04:04 alexzhou-chata

Thank you @alexzhou-chata. The large size of the react projects is a known issue from the yo office template.

  • https://github.com/OfficeDev/Office-Addin-TaskPane-React/issues/92
  • https://github.com/OfficeDev/Office-Addin-TaskPane-React/issues/119

@millerds is working on this issue, When we improve the template, we'll update this sample.

AlexJerabek avatar Apr 25 '23 17:04 AlexJerabek

Thank you guys!

alexzhou-chata avatar Apr 26 '23 17:04 alexzhou-chata

Reassigning to @millerds, since he's working on the two related issues.

AlexJerabek avatar May 12 '23 17:05 AlexJerabek

Is this still worked on, or completed @AlexJerabek @millerds ?

aafvstam avatar Apr 18 '24 19:04 aafvstam

@aafvstam This is still an issue, but it's better tracked in the template repo. Since the related issues are still open, we can close and avoid redundancy.

https://github.com/OfficeDev/Office-Addin-TaskPane-React/issues/92 https://github.com/OfficeDev/Office-Addin-TaskPane-React/issues/119

AlexJerabek avatar Apr 18 '24 21:04 AlexJerabek