chore(config): 🔨 change css bundle to @jotsr/smart-css-bundler

This commit is contained in:
Julien Oculi 2024-06-10 22:41:10 +02:00
parent 503d8425c2
commit 5dd9f00599
2 changed files with 8 additions and 6 deletions

View file

@ -28,8 +28,8 @@
], ],
"imports": { "imports": {
"$fresh/": "https://deno.land/x/fresh@1.6.8/", "$fresh/": "https://deno.land/x/fresh@1.6.8/",
"preact": "https://esm.sh/preact@10.19.6", "$std/": "https://deno.land/std@0.208.0/",
"preact/": "https://esm.sh/preact@10.19.6/", "@jotsr/smart-css-bundler": "jsr:@jotsr/smart-css-bundler@^0.1.0",
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2",
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1",
"$std/": "https://deno.land/std@0.208.0/", "$std/": "https://deno.land/std@0.208.0/",

View file

@ -1,12 +1,14 @@
import { defineConfig } from '$fresh/server.ts' import { defineConfig } from '$fresh/server.ts'
import { cssBundler } from 'css_bundler' import { cssBundler } from '@jotsr/smart-css-bundler/fresh'
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
cssBundler( cssBundler(
import.meta.resolve('./src/stylesheets'), ['./src/stylesheets/main.css'],
import.meta.resolve('./cache'), {
{ logLevel: 'error' }, cacheDir: './_fresh/smart_css_bundler/cache',
externalPaths: [],
}
), ),
], ],
}) })