-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Restore ability to use console.log in vite #2233
Conversation
- Swap our swc plugin to remove-react-properties - Configure remove-react-properties to preserve our testids
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Restore ability to use console.log in vite - Swap our swc plugin to remove-react-properties - Configure remove-react-properties to preserve our testids
We need to pass a swc-plugin in order for swc to be used during build (using it at build matches what we did for webpack prior to vite), otherwise it only gets used for the dev server. The remove console plugin was doing what it promised! (I had misread it's config when I added it, and thought I had effectively disabled it by passing an empty config).
The plugins we have to choose from are here: https://github.com/swc-project/plugins/tree/main/packages
I don't think any of them are necessary for actual at this time, so I choose the remove react properties plugin. I had to configure it a bit with some property, otherwise it will strip out all our data-testids by default. So now it strips out any use of
data-debug
. Which we haven't used to-date.