Skip to content

Commit

Permalink
feat(vite): add vite plugin restart support
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Dec 31, 2024
1 parent 60ac180 commit f5bc6ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/http",
"version": "5.9.0",
"version": "5.10.0",
"description": "The Athenna Http server. Built on top of fastify.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
8 changes: 6 additions & 2 deletions src/vite/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import PluginRestart from 'vite-plugin-restart'

import { Path } from '@athenna/common'
import { mergeConfig, defineConfig, type UserConfig } from 'vite'

Expand All @@ -24,9 +26,11 @@ export function defineAthennaConfig(config: UserConfig) {
entryFileNames: '[name].js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]'
}
},
input: [Path.resources('css/app.scss'), Path.resources('js/app.js')]
}
}
},
plugins: [PluginRestart({ reload: [Path.views('**/*.edge')] })]
}

return defineConfig(mergeConfig(defaultConfig, config))
Expand Down

0 comments on commit f5bc6ac

Please sign in to comment.