Skip to content

Commit

Permalink
fix: #14
Browse files Browse the repository at this point in the history
  • Loading branch information
zuofenghua committed Sep 7, 2021
1 parent 38c77a3 commit 5f4bba6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 33 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "umi-plugin-tailwindcss",
"version": "3.1.5",
"version": "3.2.1",
"description": "[email protected] plugin for tailwindcss",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,8 @@
"access": "public"
},
"dependencies": {
"@tailwindcss/postcss7-compat": "latest"
"@tailwindcss/postcss7-compat": "latest",
"autoprefixer": "9.x"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^7.1.1",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ export default (api: IApi) => {
? 'tailwindcss'
: '@tailwindcss/postcss7-compat';

const autoprefixerOptions = api.userConfig.autoprefixer;

config.extraPostCSSPlugins = [
...(config.extraPostCSSPlugins || []),
require(tailwindcssPackageName)({ config: configPath }),
require('autoprefixer')(autoprefixerOptions),
];

return config;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"include": [
"src"
]
}
}
67 changes: 37 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1324,30 +1324,30 @@
dependencies:
defer-to-connect "^1.0.1"

"@tailwindcss/postcss7-compat@^2.2.7":
version "2.2.7"
resolved "https://registry.yarnpkg.com/@tailwindcss/postcss7-compat/-/postcss7-compat-2.2.7.tgz#5e7e436ed0f4e0ed945d35b1f87189daa681dd1f"
integrity sha512-1QkWUEeLV1AoNipMCE6IlL7XYScGb+DAzaXy35ooMDvl0G8kCMHBNqGxyVAnTcK8gyJNUzkKXExkUnbjAndd/g==
"@tailwindcss/postcss7-compat@latest":
version "2.2.10"
resolved "https://registry.yarnpkg.com/@tailwindcss/postcss7-compat/-/postcss7-compat-2.2.10.tgz#a84da77fb45e80b638419d25963814724129880d"
integrity sha512-mAINjdThr/MtFmYw1aXX7lCskd2W4v8cySFviQT4tcYG4BofCewP7wp3c2WghAwAf4Ox9ZKU4pV4YeS6YU/7kg==
dependencies:
arg "^5.0.0"
arg "^5.0.1"
autoprefixer "^9"
bytes "^3.0.0"
chalk "^4.1.1"
chalk "^4.1.2"
chokidar "^3.5.2"
color "^3.2.0"
cosmiconfig "^7.0.0"
color "^4.0.1"
cosmiconfig "^7.0.1"
detective "^5.2.0"
didyoumean "^1.2.2"
dlv "^1.1.3"
fast-glob "^3.2.7"
fs-extra "^10.0.0"
glob-parent "^6.0.0"
glob-parent "^6.0.1"
html-tags "^3.1.0"
is-glob "^4.0.1"
lodash "^4.17.21"
lodash.topath "^4.5.2"
modern-normalize "^1.1.0"
node-emoji "^1.8.1"
node-emoji "^1.11.0"
normalize-path "^3.0.0"
object-hash "^2.2.0"
postcss "^7"
Expand Down Expand Up @@ -2350,10 +2350,10 @@ arch@^2.1.1:
resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e"
integrity sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==

arg@^5.0.0:
arg@^5.0.1:
version "5.0.1"
resolved "http://npm.vivo.com.cn/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb"
integrity sha1-6wyaj3d4bK0q+P8rhiiZhC17ats=
resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb"
integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA==

argparse@^1.0.7:
version "1.0.10"
Expand Down Expand Up @@ -2465,7 +2465,7 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

autoprefixer@^9:
autoprefixer@9.x, autoprefixer@^9:
version "9.8.6"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f"
integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==
Expand Down Expand Up @@ -2951,10 +2951,10 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^4.1.1:
chalk@^4.1.2:
version "4.1.2"
resolved "http://npm.vivo.com.cn/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
dependencies:
ansi-styles "^4.1.0"
supports-color "^7.1.0"
Expand Down Expand Up @@ -3125,7 +3125,7 @@ collection-visit@^1.0.0:
map-visit "^1.0.0"
object-visit "^1.0.0"

color-convert@^1.9.0, color-convert@^1.9.1, color-convert@^1.9.3:
color-convert@^1.9.0, color-convert@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
Expand Down Expand Up @@ -3173,12 +3173,12 @@ [email protected], color@^3.0.0:
color-convert "^1.9.1"
color-string "^1.5.2"

color@^3.2.0:
version "3.2.1"
resolved "http://npm.vivo.com.cn/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
integrity sha1-NUTcGYyvRJDD7MmnkLVP6f9F4WQ=
color@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/color/-/color-4.0.1.tgz#21df44cd10245a91b1ccf5ba031609b0e10e7d67"
integrity sha512-rpZjOKN5O7naJxkH2Rx1sZzzBgaiWECc6BYXjeCE6kF0kcASJYbUq02u7JqIHwCb/j3NhV+QhRL2683aICeGZA==
dependencies:
color-convert "^1.9.3"
color-convert "^2.0.1"
color-string "^1.6.0"

colorette@^1.2.1:
Expand Down Expand Up @@ -3360,10 +3360,10 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.2.1:
js-yaml "^3.13.1"
parse-json "^4.0.0"

cosmiconfig@^7.0.0:
cosmiconfig@^7.0.1:
version "7.0.1"
resolved "http://npm.vivo.com.cn/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
integrity sha1-cU11ZSLKzoZ4Z8y0R0xdAbuuXW0=
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==
dependencies:
"@types/parse-json" "^4.0.0"
import-fresh "^3.2.1"
Expand Down Expand Up @@ -4616,10 +4616,10 @@ glob-parent@^5.1.2, glob-parent@~5.1.2:
dependencies:
is-glob "^4.0.1"

glob-parent@^6.0.0:
glob-parent@^6.0.1:
version "6.0.1"
resolved "http://npm.vivo.com.cn/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7"
integrity sha1-QgVPaF62pE56fRialu+kClSXGqc=
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.1.tgz#42054f685eb6a44e7a7d189a96efa40a54971aa7"
integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog==
dependencies:
is-glob "^4.0.1"

Expand Down Expand Up @@ -6137,13 +6137,20 @@ nice-try@^1.0.4:
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==

node-emoji@^1.10.0, node-emoji@^1.8.1:
node-emoji@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.10.0.tgz#8886abd25d9c7bb61802a658523d1f8d2a89b2da"
integrity sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==
dependencies:
lodash.toarray "^4.4.0"

node-emoji@^1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c"
integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==
dependencies:
lodash "^4.17.21"

node-libs-browser@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425"
Expand Down

0 comments on commit 5f4bba6

Please sign in to comment.