scss support

This commit is contained in:
Jacky Zhao 2023-06-01 17:35:31 -04:00
parent c1c46ad67e
commit 42d3a7de17
15 changed files with 574 additions and 99 deletions

View file

@ -5,6 +5,7 @@ import { hideBin } from 'yargs/helpers'
import esbuild from 'esbuild'
import chalk from 'chalk'
import requireFromString from 'require-from-string'
import { sassPlugin } from 'esbuild-sass-plugin'
const fp = "./quartz.config.ts"
const { version } = JSON.parse(readFileSync("./package.json").toString())
@ -59,7 +60,10 @@ yargs(hideBin(process.argv))
format: "cjs",
jsx: "automatic",
jsxImportSource: "preact",
external: ["@napi-rs/simple-git"]
external: ["@napi-rs/simple-git"],
plugins: [sassPlugin({
type: 'css-text'
})]
}).catch(err => {
console.error(`${chalk.red("Couldn't parse Quartz configuration:")} ${fp}`)
console.log(`Reason: ${chalk.grey(err)}`)