fix(plugin/twind): load configuration as module (#705)
This commit loads the Twind configuration as an actual module rather than evaluating it on the server and then serializing. This allows usage of unserializable plugin functions. Co-authored-by: Elias Sjögreen <eliassjogreen1@gmail.com>
This commit is contained in:
co-authored by
Elias Sjögreen
parent
8e9658cae5
commit
1b3c9f2569
+1
-1
@@ -8,6 +8,6 @@ import { start } from "$fresh/server.ts";
|
||||
import twindPlugin from "$fresh/plugins/twind.ts";
|
||||
|
||||
import manifest from "./fresh.gen.ts";
|
||||
import twindConfig from "./twind.config.js";
|
||||
import twindConfig from "./twind.config.ts";
|
||||
|
||||
await start(manifest, { plugins: [twindPlugin(twindConfig)] });
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Options } from "$fresh/plugins/twind.ts";
|
||||
import * as colors from "twind/colors";
|
||||
|
||||
/** @type {import("$fresh/plugins/twind.ts").Options} */
|
||||
export default {
|
||||
selfURL: import.meta.url,
|
||||
theme: {
|
||||
colors: {
|
||||
blue: colors.blue,
|
||||
@@ -13,4 +14,4 @@ export default {
|
||||
transparent: "transparent",
|
||||
},
|
||||
},
|
||||
};
|
||||
} as Options;
|
||||
Reference in New Issue
Block a user