Fixed crash on SCSS error.

This commit is contained in:
BurnyLlama 2023-03-06 10:20:47 +01:00
parent 2eaa38c955
commit fc2406eea4

5
dev.js
View File

@ -20,6 +20,7 @@ njk.configure(
chokidar.watch("./src").on("change", () => { chokidar.watch("./src").on("change", () => {
console.log("Detected changes in SCSS! Recompiling...") console.log("Detected changes in SCSS! Recompiling...")
try {
const { css } = sass.compile( const { css } = sass.compile(
"./src/main.scss", "./src/main.scss",
{ {
@ -40,6 +41,10 @@ chokidar.watch("./src").on("change", () => {
) )
console.log("Saved!") console.log("Saved!")
} catch (error) {
console.log("Error while compiling!")
console.error(error)
}
}) })
server.use("/assets", express.static("./out")) server.use("/assets", express.static("./out"))