Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/interfaces/plugin-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export interface PluginOptionsInterface extends OptionsInterface {
export interface VitePluginOptionsInterface {
langPath?: string
additionalLangPaths?: string[]
excludeFrameworkTranslations: boolean
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be an optional value?

}
3 changes: 2 additions & 1 deletion src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export default function i18n(options: string | VitePluginOptionsInterface = 'lan

const additionalLangPaths = typeof options === 'string' ? [] : options.additionalLangPaths ?? []

const frameworkLangPath = 'vendor/laravel/framework/src/Illuminate/Translation/lang/'.replace('/', path.sep)
const excludeFrameworkTranslations = typeof options === 'string' ? options === 'lang' : options.excludeFrameworkTranslations ?? true
const frameworkLangPath = excludeFrameworkTranslations ? '' : 'vendor/laravel/framework/src/Illuminate/Translation/lang/'.replace('/', path.sep)
let files: ParsedLangFileInterface[] = []
let exitHandlersBound: boolean = false

Expand Down