Skip to content

Instantly share code, notes, and snippets.

@Br0wnZ
Created December 2, 2022 09:10
Show Gist options
  • Save Br0wnZ/753ee52337b8e724de8981e5cb225d16 to your computer and use it in GitHub Desktop.
Save Br0wnZ/753ee52337b8e724de8981e5cb225d16 to your computer and use it in GitHub Desktop.
vite config for vue 3 and i18n
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