mirror of
https://github.com/xHyroM/website.git
synced 2024-11-22 06:51:05 +01:00
fix(astro-integrations): check if distURL is null
This commit is contained in:
parent
b09a520282
commit
49546bed12
1 changed files with 3 additions and 4 deletions
|
@ -9,10 +9,9 @@ export default (): AstroIntegration => {
|
||||||
hooks: {
|
hooks: {
|
||||||
"astro:build:done": async (opts) => {
|
"astro:build:done": async (opts) => {
|
||||||
for (const route of opts.routes) {
|
for (const route of opts.routes) {
|
||||||
const content = await readFile(
|
if (!route.distURL) continue;
|
||||||
fileURLToPath(route.distURL!),
|
|
||||||
"utf-8"
|
const content = await readFile(fileURLToPath(route.distURL), "utf-8");
|
||||||
);
|
|
||||||
const minified = await minify(content, {
|
const minified = await minify(content, {
|
||||||
removeAttributeQuotes: true,
|
removeAttributeQuotes: true,
|
||||||
collapseWhitespace: true,
|
collapseWhitespace: true,
|
||||||
|
|
Loading…
Reference in a new issue