OfficeDev / OfficeDev/Office-Addin-TaskPane-React
react app bundle size issue
@millerds is already working on this.
Since Nov 19, 2024.
- Dominant language
- TypeScript
- Stars
- 89
- Forks
- 46
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 3
Description
Expected behavior
Build size should be reasonable for react app.
Current behavior
Using react/typescript template for task pane app. Npm run build produce large taskpane.js file
The following message is show in the console
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 (402 KiB)
vendor.js
taskpane (13.6 MiB)
taskpane.js
Webpack configuration may be incorrect.
It seems that it was at least partly fixed inside the template repo https://github.com/OfficeDev/Office-Addin-TaskPane-React?tab=readme-ov-file
but for some reason generator office uses older version of the template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- create react task pane app using generator (options: Office Add-in Task Pane project using React framework, Typescript)
- install dependancies
- build the app (npm run build)
- check file sizes
Context
- Operating System: macOS
- Node version: 22.11.0
- Tool version: 2.0.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.