From cc532cddde058f381cb9c115fc2945833601f905 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Mon, 7 Jun 2021 15:04:07 -0500 Subject: [PATCH] Fix Tailwind resolution (#314) * fix: properly resolve tailwind postcss plugin * chore: add changeset * chore: update @snowpack/plugin-postcss --- .changeset/shaggy-months-boil.md | 5 +++++ packages/astro/package.json | 2 +- packages/astro/src/runtime.ts | 2 +- yarn.lock | 16 +++++++++------- 4 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 .changeset/shaggy-months-boil.md diff --git a/.changeset/shaggy-months-boil.md b/.changeset/shaggy-months-boil.md new file mode 100644 index 000000000..e0e1c6637 --- /dev/null +++ b/.changeset/shaggy-months-boil.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Properly resolve `tailwindcss` depedency if using Tailwind diff --git a/packages/astro/package.json b/packages/astro/package.json index e5d296492..bfe1cc5e2 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -47,7 +47,7 @@ "@babel/parser": "^7.13.15", "@babel/traverse": "^7.13.15", "@silvenon/remark-smartypants": "^1.0.0", - "@snowpack/plugin-postcss": "^1.4.0", + "@snowpack/plugin-postcss": "^1.4.1", "@snowpack/plugin-sass": "^1.4.0", "acorn": "^7.4.0", "astring": "^1.7.4", diff --git a/packages/astro/src/runtime.ts b/packages/astro/src/runtime.ts index 9b7aebae1..bd5171f06 100644 --- a/packages/astro/src/runtime.ts +++ b/packages/astro/src/runtime.ts @@ -396,7 +396,7 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO config: { plugins: { [resolveDependency('autoprefixer')]: {}, - ...(astroConfig.devOptions.tailwindConfig ? { [resolveDependency('autoprefixer')]: {} } : {}), + ...(astroConfig.devOptions.tailwindConfig ? { [resolveDependency('tailwindcss')]: {} } : {}), }, }, }, diff --git a/yarn.lock b/yarn.lock index 1af5947c6..1a7943d5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1311,11 +1311,13 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== -"@snowpack/plugin-postcss@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@snowpack/plugin-postcss/-/plugin-postcss-1.4.0.tgz#af95fca31ac9663ad41b89d58c7473776fb6c415" - integrity sha512-IKJefynh4Bnpy2bXFxGFdwu9uAHvcL2jmpuiR6qZADbd1Pi6dUnRI6Ip84nYoGUMeIaGrbbHPMeAKuSlVv2GTQ== +"@snowpack/plugin-postcss@^1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@snowpack/plugin-postcss/-/plugin-postcss-1.4.1.tgz#21aa7b0633204d60bf3a82a956964d641f172ffa" + integrity sha512-igFSEIje1akoHgnHqNfGSetxMb6V9O9ygMoKtXlEfHaEQhABxZd5a9wbZQoOoDIDCECzmy3DIavM7k1qb2q59Q== dependencies: + minimatch "^3.0.4" + normalize-path "^3.0.0" postcss-load-config "^3.0.1" workerpool "^6.1.2" @@ -9423,9 +9425,9 @@ table@^6.0.9: strip-ansi "^6.0.0" tailwindcss@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.1.2.tgz#29402bf73a445faedd03df6d3b177e7b52b7c4a1" - integrity sha512-T5t+wwd+/hsOyRw2HJuFuv0LTUm3MUdHm2DJ94GPVgzqwPPFa9XxX0KlwLWupUuiOUj6uiKURCzYPHFcuPch/w== + version "2.1.4" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.1.4.tgz#ee8a1b8ccc140db61960b6738f968a8a1c4cd1f8" + integrity sha512-fh1KImDLg6se/Suaelju/5oFbqq1b0ntagmGLu0aG9LlnNPGHgO1n/4E57CbKcCtyz/VYnvVXUiWmfyfBBZQ6g== dependencies: "@fullhuman/postcss-purgecss" "^3.1.3" bytes "^3.0.0"