Skip to content

Commit f5056fb

Browse files
DemonsDemons
Demons
authored and
Demons
committed
feat: add style-components-pxtovw
1 parent 8109ae7 commit f5056fb

File tree

4 files changed

+62
-4
lines changed

4 files changed

+62
-4
lines changed

index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
var global = window;
1717
}
1818
</script>
19-
<script>
19+
<!-- <script>
2020
setInterval(function () {
2121
check();
2222
}, 50);
@@ -34,7 +34,7 @@
3434
} catch (err) {}
3535
};
3636
check();
37-
</script>
37+
</script> -->
3838

3939

4040
</body>

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"ahooks": "^3.7.4",
3030
"antd": "^5.2.3",
3131
"axios": "^1.3.4",
32+
"babel-plugin-styled-components-px2vw": "^1.6.0",
3233
"bip39": "^3.1.0",
3334
"buffer": "^6.0.3",
3435
"crypto-browserify": "^3.12.0",

vite.config.ts

+14
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ export default defineConfig({
4343
plugins: [
4444
// requireTransform({ fileRegex: /.js$/ }),
4545
react(),
46+
// {
47+
// babel: {
48+
// plugins: [
49+
// [
50+
// 'babel-plugin-styled-components-px2vw',
51+
// {
52+
// unitToConvert: 'px',
53+
// unitPrecision: 5,
54+
// minPixelValue: 0,
55+
// },
56+
// ],
57+
// ],
58+
// },
59+
// }
4660
viteEslint({
4761
failOnError: false,
4862
}),

yarn.lock

+45-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
dependencies:
247247
"@babel/types" "^7.18.6"
248248

249-
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
249+
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
250250
version "7.20.2"
251251
resolved "https://registry.npmmirror.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz"
252252
integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==
@@ -3122,6 +3122,15 @@ babel-plugin-polyfill-regenerator@^0.4.1:
31223122
dependencies:
31233123
"@babel/helper-define-polyfill-provider" "^0.3.3"
31243124

3125+
babel-plugin-styled-components-px2vw@^1.6.0:
3126+
version "1.6.0"
3127+
resolved "https://registry.npmmirror.com/babel-plugin-styled-components-px2vw/-/babel-plugin-styled-components-px2vw-1.6.0.tgz#ad88d18fdd2be4a67335e3c0c82a2645238e448e"
3128+
integrity sha512-uvon5DWLSi1NXVmxJLwbBP+UMJZtNHxufhBq5NbYeW9SLxmdrnhAt2FWlaZg/ilJtwEKJKJMk/kzfDvY5H/3qA==
3129+
dependencies:
3130+
"@babel/helper-plugin-utils" "^7.13.0"
3131+
memoizerific "^1.11.3"
3132+
postcss-px-to-viewport "^1.1.1"
3133+
31253134
"babel-plugin-styled-components@>= 1.12.0":
31263135
version "2.0.7"
31273136
resolved "https://registry.npmmirror.com/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.7.tgz#c81ef34b713f9da2b7d3f5550df0d1e19e798086"
@@ -5841,6 +5850,11 @@ map-obj@^4.0.0:
58415850
resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz"
58425851
integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==
58435852

5853+
map-or-similar@^1.5.0:
5854+
version "1.5.0"
5855+
resolved "https://registry.npmmirror.com/map-or-similar/-/map-or-similar-1.5.0.tgz#6de2653174adfb5d9edc33c69d3e92a1b76faf08"
5856+
integrity sha512-0aF7ZmVon1igznGI4VS30yugpduQW3y3GkcgGJOp7d8x8QrizhigUxjI/m2UojsXXto+jLAH3KSz+xOJTiORjg==
5857+
58445858
md5.js@^1.3.4:
58455859
version "1.3.5"
58465860
resolved "https://registry.npmmirror.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f"
@@ -5850,6 +5864,13 @@ md5.js@^1.3.4:
58505864
inherits "^2.0.1"
58515865
safe-buffer "^5.1.2"
58525866

5867+
memoizerific@^1.11.3:
5868+
version "1.11.3"
5869+
resolved "https://registry.npmmirror.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a"
5870+
integrity sha512-/EuHYwAPdLtXwAwSZkh/Gutery6pD2KYd44oQLhAvQp/50mpyduZh8Q7PYHXTCJ+wuXxt7oij2LXyIJOOYFPog==
5871+
dependencies:
5872+
map-or-similar "^1.5.0"
5873+
58535874
meow@^5.0.0:
58545875
version "5.0.0"
58555876
resolved "https://registry.npmmirror.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
@@ -6021,6 +6042,11 @@ nanoid@^3.3.4:
60216042
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz"
60226043
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
60236044

6045+
nanoid@^3.3.6:
6046+
version "3.3.6"
6047+
resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
6048+
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
6049+
60246050
natural-compare-lite@^1.4.0:
60256051
version "1.4.0"
60266052
resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz"
@@ -6126,7 +6152,7 @@ npm-run-path@^5.1.0:
61266152
dependencies:
61276153
path-key "^4.0.0"
61286154

6129-
object-assign@^4.1.1:
6155+
object-assign@>=4.0.1, object-assign@^4.1.1:
61306156
version "4.1.1"
61316157
resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
61326158
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
@@ -6444,6 +6470,14 @@ pngjs@^3.3.0:
64446470
resolved "https://registry.npmmirror.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
64456471
integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==
64466472

6473+
postcss-px-to-viewport@^1.1.1:
6474+
version "1.1.1"
6475+
resolved "https://registry.npmmirror.com/postcss-px-to-viewport/-/postcss-px-to-viewport-1.1.1.tgz#a25ca410b553c9892cc8b525cc710da47bf1aa55"
6476+
integrity sha512-2x9oGnBms+e0cYtBJOZdlwrFg/mLR4P1g2IFu7jYKvnqnH/HLhoKyareW2Q/x4sg0BgklHlP1qeWo2oCyPm8FQ==
6477+
dependencies:
6478+
object-assign ">=4.0.1"
6479+
postcss ">=5.0.2"
6480+
64476481
postcss-selector-parser@^6.0.2:
64486482
version "6.0.11"
64496483
resolved "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc"
@@ -6457,6 +6491,15 @@ postcss-value-parser@^4.0.2:
64576491
resolved "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
64586492
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
64596493

6494+
postcss@>=5.0.2:
6495+
version "8.4.22"
6496+
resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.22.tgz#c29e6776b60ab3af602d4b513d5bd2ff9aa85dc1"
6497+
integrity sha512-XseknLAfRHzVWjCEtdviapiBtfLdgyzExD50Rg2ePaucEesyh8Wv4VPdW0nbyDa1ydbrAxV19jvMT4+LFmcNUA==
6498+
dependencies:
6499+
nanoid "^3.3.6"
6500+
picocolors "^1.0.0"
6501+
source-map-js "^1.0.2"
6502+
64606503
postcss@^7.0.36:
64616504
version "7.0.39"
64626505
resolved "https://registry.npmmirror.com/postcss/-/postcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309"

0 commit comments

Comments
 (0)