diff --git a/package.json b/package.json index 6724bf0..8968289 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "format": "prettier --write --ignore-unknown '**/*'" }, "dependencies": { - "create-serve": "^1.0.0", + "create-serve": "^1.0.1", "esbuild": "^0.9.0" }, "devDependencies": { diff --git a/src/index.js b/src/index.js index 0775e5d..f7ce1c7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import esbuild from 'esbuild'; -import serve from 'create-serve'; +import serve, { error, log } from 'create-serve'; export const isWatch = process.argv.includes('-w'); @@ -8,8 +8,9 @@ const esbuildServe = async (options = {}, serveOptions = {}) => { .build({ ...options, watch: isWatch && { - onRebuild() { + onRebuild(err) { serve.update(); + err ? error('× Failed') : log('✓ Updated'); } } })