mirror of
https://github.com/xHyroM/website.git
synced 2024-12-22 12:31:06 +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: {
|
||||
"astro:build:done": async (opts) => {
|
||||
for (const route of opts.routes) {
|
||||
const content = await readFile(
|
||||
fileURLToPath(route.distURL!),
|
||||
"utf-8"
|
||||
);
|
||||
if (!route.distURL) continue;
|
||||
|
||||
const content = await readFile(fileURLToPath(route.distURL), "utf-8");
|
||||
const minified = await minify(content, {
|
||||
removeAttributeQuotes: true,
|
||||
collapseWhitespace: true,
|
||||
|
|
Loading…
Reference in a new issue