Fixed crash on SCSS error.
This commit is contained in:
parent
2eaa38c955
commit
fc2406eea4
5
dev.js
5
dev.js
|
@ -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"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user