Skip to content
Snippets Groups Projects
Unverified Commit 7d1a895b authored by DJ Mountney's avatar DJ Mountney Committed by GitHub
Browse files

Restore ability to use console.log in vite (#2233)

Restore ability to use console.log in vite

- Swap our swc plugin to remove-react-properties
- Configure remove-react-properties to preserve our testids
parent a8b42bcd
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"@svgr/cli": "^8.0.1", "@svgr/cli": "^8.0.1",
"@swc/core": "^1.3.82", "@swc/core": "^1.3.82",
"@swc/helpers": "^0.5.1", "@swc/helpers": "^0.5.1",
"@swc/plugin-remove-console": "^1.5.105", "@swc/plugin-react-remove-properties": "^1.5.108",
"@testing-library/react": "14.0.0", "@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3", "@testing-library/user-event": "14.4.3",
"@types/react": "^18.2.0", "@types/react": "^18.2.0",
......
...@@ -150,7 +150,12 @@ export default defineConfig(async ({ mode }) => { ...@@ -150,7 +150,12 @@ export default defineConfig(async ({ mode }) => {
injectShims(), injectShims(),
addWatchers(), addWatchers(),
react({ react({
plugins: [['@swc/plugin-remove-console', {}]], plugins: [
[
'@swc/plugin-react-remove-properties',
{ properties: ['^data-debug'] },
],
],
devTarget: 'es2022', devTarget: 'es2022',
}), }),
viteTsconfigPaths({ root: '../..' }), viteTsconfigPaths({ root: '../..' }),
......
---
category: Bugfix
authors: [twk3]
---
Restore ability to use console.log in vite
...@@ -69,7 +69,7 @@ __metadata: ...@@ -69,7 +69,7 @@ __metadata:
"@svgr/cli": "npm:^8.0.1" "@svgr/cli": "npm:^8.0.1"
"@swc/core": "npm:^1.3.82" "@swc/core": "npm:^1.3.82"
"@swc/helpers": "npm:^0.5.1" "@swc/helpers": "npm:^0.5.1"
"@swc/plugin-remove-console": "npm:^1.5.105" "@swc/plugin-react-remove-properties": "npm:^1.5.108"
"@testing-library/react": "npm:14.0.0" "@testing-library/react": "npm:14.0.0"
"@testing-library/user-event": "npm:14.4.3" "@testing-library/user-event": "npm:14.4.3"
"@types/react": "npm:^18.2.0" "@types/react": "npm:^18.2.0"
...@@ -3752,10 +3752,10 @@ __metadata: ...@@ -3752,10 +3752,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
   
"@swc/plugin-remove-console@npm:^1.5.105": "@swc/plugin-react-remove-properties@npm:^1.5.108":
version: 1.5.105 version: 1.5.108
resolution: "@swc/plugin-remove-console@npm:1.5.105" resolution: "@swc/plugin-react-remove-properties@npm:1.5.108"
checksum: b82710090c3202a473771a9c6a67da3fd5136e19d8214b967de8d3010139d95727f0834920cbb3a4fb284d68f363a4650d32f692c5293854e902b5fa33c3fbab checksum: 7d849702d036353f2d58515aa20e4557379fccda3d48b2a38835415e3a37fe1ce1c560fbc64e164a8fc09b833c42ecc4a39775cc1d6da8ba83860a464ddcb24f
languageName: node languageName: node
linkType: hard linkType: hard
   
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment