chore: fixes the Semicolon or block is expected postcss parsing error (#1746)

This commit is contained in:
CokaKoala
2023-07-14 13:48:55 -04:00
committed by GitHub
parent 10b447f7b7
commit 3c9cbf355b
4 changed files with 25 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
const path = require('path');
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
@@ -5,7 +6,7 @@ const config = {
plugins: [
require('postcss-import'),
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
tailwindcss(path.resolve(__dirname, './tailwind.config.cjs')),
//But others, like autoprefixer, need to run after,
autoprefixer
]

View File

@@ -1,5 +1,9 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -7,7 +11,11 @@ const config = {
// for more information about preprocessors
preprocess: [
vitePreprocess({
postcss: true
style: {
css: {
postcss: join(__dirname, 'postcss.config.cjs')
}
}
})
],
kit: {

View File

@@ -1,6 +1,7 @@
const path = require('path');
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
plugins: [tailwindcss(path.resolve(__dirname, './tailwind.config.cjs')), autoprefixer]
};

View File

@@ -1,5 +1,9 @@
import adapter from '@sveltejs/adapter-vercel';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -7,7 +11,11 @@ const config = {
// for more information about preprocessors
preprocess: [
vitePreprocess({
postcss: true
style: {
css: {
postcss: join(__dirname, 'postcss.config.cjs')
}
}
})
],
kit: {