Created
December 2, 2022 09:10
-
-
Save Br0wnZ/753ee52337b8e724de8981e5cb225d16 to your computer and use it in GitHub Desktop.
vite config for vue 3 and i18n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fileURLToPath, URL } from "node:url"; | |
import { resolve, dirname } from "node:path"; | |
import { defineConfig } from 'vite' | |
import vue from '@vitejs/plugin-vue' | |
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite"; | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
plugins: [ | |
vue(), | |
VueI18nPlugin({ | |
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/**'), | |
}) | |
], | |
resolve: { | |
alias: { | |
'@': fileURLToPath(new URL('./src', import.meta.url)) | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment