11import type { RehypePlugin } from "@astrojs/markdown-remark" ;
2- import type { AstroIntegration , AstroUserConfig } from "astro" ;
2+ import type { AstroIntegration } from "astro" ;
33import type { Options as AutolinkHeadingsOptions } from "rehype-autolink-headings" ;
44import type { Options as ClassNamesOptions } from "rehype-class-names" ;
55import type { Options as ExternalLinksOptions } from "rehype-external-links" ;
6- import type { FileImporter , Importer , StringOptions } from "sass-embedded" ;
6+ import type { FileImporter , Importer } from "sass-embedded" ;
77import type { ShikiTransformer } from "shiki" ;
8- import type { PluginOption } from "vite" ;
8+ import type { PluginOption , SassPreprocessorOptions } from "vite" ;
99
1010import cp from "node:child_process" ;
1111import fs from "node:fs/promises" ;
@@ -15,6 +15,7 @@ import util from "node:util";
1515
1616import { rehypeHeadingIds } from "@astrojs/markdown-remark" ;
1717import mdx from "@astrojs/mdx" ;
18+ import { defineConfig } from "astro/config" ;
1819// @ts -expect-error - There's no type declaration but it exists.
1920import remarkA11yEmoji from "@fec/remark-a11y-emoji" ;
2021import { addExtension , createFilter , dataToEsm } from "@rollup/pluginutils" ;
@@ -370,21 +371,7 @@ const importScssJson: Importer<"async"> = {
370371 } ,
371372} ;
372373
373- /**
374- * @see
375- * {@link https://vite.dev/config/shared-options.html#css-preprocessoroptions }
376- */
377- type ViteSassOptions = StringOptions < "async" > & {
378- /**
379- * Sets which Sass API to use.
380- */
381- api ?: "legacy" | "modern" | "modern-compiler" ;
382- /**
383- * Injects code at the top of each stylesheet.
384- */
385- additionalData ?: string ;
386- } ;
387- const scss : ViteSassOptions = {
374+ const scss : SassPreprocessorOptions = {
388375 api : "modern-compiler" ,
389376 additionalData : partialsImport ,
390377 importers : [ importScssPartials , importScssJson ] ,
@@ -439,8 +426,9 @@ const generateIdsPlugin: PluginOption = {
439426 } ,
440427} ;
441428
442- export default < AstroUserConfig > {
429+ export default defineConfig ( {
443430 site : "https://mce.codes" ,
431+ trailingSlash : "never" ,
444432 devToolbar : { enabled : false } ,
445433 compressHTML : false ,
446434 scopedStyleStrategy : "class" ,
@@ -468,4 +456,4 @@ export default <AstroUserConfig>{
468456 css : { preprocessorOptions : { scss } } ,
469457 plugins : [ generateIdsPlugin ] ,
470458 } ,
471- } ;
459+ } ) ;
0 commit comments