Skip to content

Commit

Permalink
Merge pull request #1 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(fastify): add root default value
  • Loading branch information
jlenon7 authored Jan 2, 2025
2 parents 55a0056 + 6eb8e4b commit 52fb06b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/vite",
"version": "5.0.0",
"version": "5.1.0",
"description": "Vite plugin for Athenna Framework.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
5 changes: 3 additions & 2 deletions src/fastify/FastifyVite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import { View } from '@athenna/view'
import { Vite } from '#src/vite/Vite'
import { EdgeError } from 'edge-error'
import { Config } from '@athenna/config'
import { Options } from '@athenna/common'
import type { FastifyInstance } from 'fastify'
import { Path, Options } from '@athenna/common'
import type { FastifyViteOptions } from '#src/types'
import { mergeConfig, type ViteDevServer } from 'vite'

Expand All @@ -34,10 +34,11 @@ export class FastifyVite {
public constructor(scope: FastifyInstance, options: FastifyViteOptions) {
this.scope = scope
this.options = Options.create(options, {
root: Path.pwd(),
assetsUrl: '/assets',
buildDirectory: 'public/assets',
dev: Config.is('app.environment', 'production'),
manifestFile: this.options.buildDirectory
manifestFile: this.options?.buildDirectory
? path.join(this.options.buildDirectory, '.vite/manifest.json')
: 'public/assets/.vite/manifest.json'
})
Expand Down

0 comments on commit 52fb06b

Please sign in to comment.