From 5dd9f005992ba76d6e03907a1c1fe2965890fdfb Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Mon, 10 Jun 2024 22:41:10 +0200 Subject: [PATCH] chore(config): :hammer: change css bundle to `@jotsr/smart-css-bundler` --- deno.json | 4 ++-- fresh.config.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/deno.json b/deno.json index 8cf6f3f..ba2cc68 100644 --- a/deno.json +++ b/deno.json @@ -28,8 +28,8 @@ ], "imports": { "$fresh/": "https://deno.land/x/fresh@1.6.8/", - "preact": "https://esm.sh/preact@10.19.6", - "preact/": "https://esm.sh/preact@10.19.6/", + "$std/": "https://deno.land/std@0.208.0/", + "@jotsr/smart-css-bundler": "jsr:@jotsr/smart-css-bundler@^0.1.0", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", "$std/": "https://deno.land/std@0.208.0/", diff --git a/fresh.config.ts b/fresh.config.ts index 24c17f4..858780f 100644 --- a/fresh.config.ts +++ b/fresh.config.ts @@ -1,12 +1,14 @@ import { defineConfig } from '$fresh/server.ts' -import { cssBundler } from 'css_bundler' +import { cssBundler } from '@jotsr/smart-css-bundler/fresh' export default defineConfig({ plugins: [ cssBundler( - import.meta.resolve('./src/stylesheets'), - import.meta.resolve('./cache'), - { logLevel: 'error' }, + ['./src/stylesheets/main.css'], + { + cacheDir: './_fresh/smart_css_bundler/cache', + externalPaths: [], + } ), ], })