summaryrefslogtreecommitdiff
path: root/src/compiler/transform/styles.ts
diff options
context:
space:
mode:
authorGravatar Drew Powers <1369770+drwpow@users.noreply.github.com> 2021-04-14 13:21:25 -0600
committerGravatar GitHub <noreply@github.com> 2021-04-14 13:21:25 -0600
commit034674c88c5eab59d1cf8883951daa60693fb95c (patch)
tree603f2e7e6e1e825f303c36ca1b72cccd3caba43d /src/compiler/transform/styles.ts
parentec75312a153424a47e05d72d41f4c3152cc7ad09 (diff)
downloadastro-034674c88c5eab59d1cf8883951daa60693fb95c.tar.gz
astro-034674c88c5eab59d1cf8883951daa60693fb95c.tar.zst
astro-034674c88c5eab59d1cf8883951daa60693fb95c.zip
Add Windows Support (#93)
* Add Windows to test suite * Try implicit URL
Diffstat (limited to 'src/compiler/transform/styles.ts')
-rw-r--r--src/compiler/transform/styles.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/transform/styles.ts b/src/compiler/transform/styles.ts
index bb07f3267..77eedfa89 100644
--- a/src/compiler/transform/styles.ts
+++ b/src/compiler/transform/styles.ts
@@ -2,6 +2,7 @@ import crypto from 'crypto';
import fs from 'fs';
import { createRequire } from 'module';
import path from 'path';
+import { fileURLToPath } from 'url';
import autoprefixer from 'autoprefixer';
import postcss, { Plugin } from 'postcss';
import postcssKeyframes from 'postcss-icss-keyframes';
@@ -165,7 +166,7 @@ export default function transformStyles({ compileOptions, filename, fileID }: Tr
if (miniCache.tailwindEnabled === undefined) {
const tailwindNames = ['tailwind.config.js', 'tailwind.config.mjs'];
for (const loc of tailwindNames) {
- const tailwindLoc = path.join(compileOptions.astroConfig.projectRoot.pathname, loc);
+ const tailwindLoc = path.join(fileURLToPath(compileOptions.astroConfig.projectRoot), loc);
if (fs.existsSync(tailwindLoc)) {
miniCache.tailwindEnabled = true; // Success! We have a Tailwind config file.
debug(compileOptions.logging, 'tailwind', 'Found config. Enabling.');