-
Notifications
You must be signed in to change notification settings - Fork 35
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
tutorial : using the appdir directory #83
Comments
This deserves to be merged as |
@raphaelbadia
but in reality you will fetch So basically the script should sum the nested |
thanks @raphaelbadia |
Many thanks for sharing this @raphaelbadia! I'm working on a project that mostly uses TS, so I have refactored your gist into TS with some additional changes: https://gist.github.com/terrymun/ba53d6921929e27bf9ad2b311fe08a21
Example output in console / GH actions runner: Comparing the output to the actual This might be the output you're looking for @astrodomas |
amazing @terrymun thank you for sharing it ! |
Any plan to convert this into a pull request? |
app directory is now the recommended next pattern. would love to see this work make its way into the action proper, instead of having to use a gist! |
Hello everyone, just like issue #42 I wanted to run the bundle analysis in the app directory.
I modified the script to make it work with it instead of pages dir. I didn't bother make it work for both scenarios because I only use appdir.
Here's how you can have it too :
First, install the required dependencies:
Then, you need to copy this gist : https://gist.github.com/raphaelbadia/1fbc948928378a4ce0e1ce90923263ae to a file in your repository. I called it
report-bundle-size.js
Finally, open your nextjs_bundle_analysis.yml, find the action with name "- name: Analyze bundle" and replace
npx -p nextjs-bundle-analysis report
bynode report-bundle-size.js
Result :
Cheers
The text was updated successfully, but these errors were encountered: