-
Notifications
You must be signed in to change notification settings - Fork 139
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
feat(analysis): Open stats.html
file automatically
#564
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #564 +/- ##
==========================================
- Coverage 86.38% 86.32% -0.07%
==========================================
Files 111 111
Lines 8874 8898 +24
Branches 877 877
==========================================
+ Hits 7666 7681 +15
- Misses 1194 1203 +9
Partials 14 14 ☔ View full report in Codecov by Sentry. |
analysis: flags.analyze ? { enabled: true } : undefined, | ||
analysis: flags.analyze | ||
? { | ||
enabled: true, | ||
open: flags.analyzeOpen, | ||
} | ||
: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aklinker1 how hard would it be to respect analysis.open
from the config file if --analyzeOpen
isn't passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already behaves that way after this PR. The CLI flags override the relevant options in the config file
I would recommend setting the value in the config file if you always want to open it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aklinker1 this is not how things are behaving for me locally (on 0.17.8) - to clarify, my config looks like this:
analysis: { outputFile: "build/stats.html", open: true }
and when I run wxt build --analyze
, analysis.outputFile
is respected, but analysis.open
is not.
FYI, I don't specify analysis.enable
in my config as I only want to do this in a specific NPM script.
Could it be that the override logic isn't taking into account that flags.analyzeOpen
is undefined
, but analysis.open
still exists if flags.analyze
does (like how "prop" in { prop: undefined }
is true
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, let me take a look. You're setup is what I intended, so I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, the undefined
was overriding the true
:
![Screenshot 2024-03-25 at 12 11 08 AM](https://private-user-images.githubusercontent.com/10101283/316393324-59d1fbbc-1f03-463a-9e00-d0a8a6894baf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0NDYzMzgsIm5iZiI6MTcyMjQ0NjAzOCwicGF0aCI6Ii8xMDEwMTI4My8zMTYzOTMzMjQtNTlkMWZiYmMtMWYwMy00NjNhLTllMDAtZDBhOGE2ODk0YmFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDE3MTM1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5MDFlNmFhZDc1ZTZmMDQyMmYwZTkyYmViZmE5MTEwZjJjYzFiZWQyOWE4MzQyN2NkY2M1YmUwNWEzODM1OGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0qCQj-sPzHtmYIUZwumeEfBNMmJH2Xk_qYM6nQs4ziM)
userConfig
comes from the wxt.config.ts file,inlineConfig
is the CLI flags, and merged is the output of merging them together.
Caused by the spread operator, replaced with defu
and it's working: #567
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This closes #561.
Either set
analysis.open
inwxt.config.ts
or runwxt build --analyze --analyze-open
.Todo