From 0dd3f1874956fa1d33a9d3dc9f3194b402534be0 Mon Sep 17 00:00:00 2001 From: spezifisch Date: Mon, 5 Sep 2022 10:24:26 +0200 Subject: [PATCH] fix svelte css path issues see: https://github.com/sveltejs/language-tools/issues/1394 https://github.com/sveltejs/language-tools/pull/1594 --- frontend/postcss.config.cjs | 10 ++++++++++ frontend/postcss.config.js | 7 ------- frontend/svelte.config.mjs | 8 +++++++- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 frontend/postcss.config.cjs delete mode 100644 frontend/postcss.config.js diff --git a/frontend/postcss.config.cjs b/frontend/postcss.config.cjs new file mode 100644 index 0000000..6d09ae2 --- /dev/null +++ b/frontend/postcss.config.cjs @@ -0,0 +1,10 @@ +const path = require("path") +const tailwindcss = require("tailwindcss") + +module.exports = { + plugins: { + "tailwindcss/nesting": {}, + tailwindcss: path.resolve(__dirname, "./tailwind.config.js"), + autoprefixer: {}, + }, +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js deleted file mode 100644 index c020f30..0000000 --- a/frontend/postcss.config.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: { - "tailwindcss/nesting": {}, - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/frontend/svelte.config.mjs b/frontend/svelte.config.mjs index f8b0983..7c52f0b 100644 --- a/frontend/svelte.config.mjs +++ b/frontend/svelte.config.mjs @@ -1,9 +1,15 @@ import preprocess from "svelte-preprocess" +import { dirname, join } from "path" +import { fileURLToPath } from "url" + +const __dirname = dirname(fileURLToPath(import.meta.url)) export default { preprocess: [ preprocess({ - postcss: true, + postcss: { + configFilePath: join(__dirname, "postcss.config.cjs"), + }, typescript: true, }), ],