From d4292d7438213653d58e640e4cc5592e9cbcb918 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Sun, 13 Dec 2020 12:19:09 -0800 Subject: [PATCH] Revert "fix postcss plugin cwd for relative imports" This reverts commit a05e56cbf896f3453b45d26392a77b8f953e769b. --- plugins/plugin-postcss/plugin.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/plugin-postcss/plugin.js b/plugins/plugin-postcss/plugin.js index 366142aaee..2cc6958e9b 100644 --- a/plugins/plugin-postcss/plugin.js +++ b/plugins/plugin-postcss/plugin.js @@ -1,10 +1,9 @@ -const path = require('path'); const execa = require('execa'); module.exports = function postcssPlugin(_, options) { return { name: '@snowpack/postcss-transform', - async transform({id, fileExt, contents}) { + async transform({fileExt, contents}) { const {input = ['.css'], config} = options; if (!input.includes(fileExt) || !contents) return; @@ -12,7 +11,7 @@ module.exports = function postcssPlugin(_, options) { if (config) flags.push(`--config ${config}`); const {stdout} = await execa('postcss', flags, { - cwd: path.dirname(id), + cwd: process.cwd(), input: contents, });