forked from TheOtterlord/manual
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Update dependency astro to v4 [SECURITY] (#49)
* 🔧 Update dependency astro to v4 [SECURITY] * Remove outdated experimental feature * Trigger new build --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Austin Abbott <[email protected]>
- Loading branch information
1 parent
ab28332
commit 838774e
Showing
4 changed files
with
4,696 additions
and
3,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import { defineConfig } from "astro/config"; | ||
import sitemap from "@astrojs/sitemap"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import { SITE_URL } from './src/site_config'; | ||
import { SITE_URL } from "./src/site_config"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: SITE_URL, | ||
integrations: [tailwind(), sitemap()], | ||
vite: { | ||
plugins: [rawFonts(['.ttf'])], | ||
optimizeDeps: { exclude: ['@resvg/resvg-js'] } | ||
plugins: [rawFonts([".ttf"])], | ||
optimizeDeps: { exclude: ["@resvg/resvg-js"] }, | ||
}, | ||
// Allows early access to Astro's new image optimization, which supports markdown | ||
// https://astro.build/blog/images/ | ||
experimental: { assets: true }, | ||
}); | ||
|
||
function rawFonts(ext) { | ||
return { | ||
name: 'vite-plugin-raw-fonts', | ||
name: "vite-plugin-raw-fonts", | ||
transform(_, id) { | ||
if (ext.some(e => id.endsWith(e))) { | ||
if (ext.some((e) => id.endsWith(e))) { | ||
const buffer = fs.readFileSync(id); | ||
return { | ||
code: `export default ${JSON.stringify(buffer)}`, | ||
map: null | ||
map: null, | ||
}; | ||
} | ||
} | ||
}, | ||
}; | ||
} |
Oops, something went wrong.