vue-web-component-wrapper
Version:
A Vue 3 plugin that provides a web component wrapper with styles, seamlessly integrating with Vuex, Vue Router, Vue I18n, and supporting Tailwind CSS and Sass styles.
44 lines (41 loc) • 964 B
text/typescript
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import * as path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
define: {
__VUE_PROD_DEVTOOLS__: true,
},
build: {
sourcemap: 'inline',
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
}
},
plugins: [
vue({
customElement: true,
}),
// https://github.com/antfu/unplugin-auto-import
AutoImport({
imports: ['vue'],
dts: './auto-imports.d.ts',
dirs: ['src/plugins'],
eslintrc: {
enabled: true,
globalsPropValue: true,
},
vueTemplate: true,
}),
// https://github.com/antfu/unplugin-vue-components
Components({
dirs: ['src/components', 'src/routes'],
extensions: ['vue'],
dts: './components.d.ts',
}),
],
})