mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
build(vite): replace webpack with Vite, add Typescript (#1594)
BREAKING: mixins are no longer exported from the index (and will likely be converted to hooks)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { resolve } from 'path'
|
||||
import { fileURLToPath, URL } from 'url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
publicDir: false,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'@tests': fileURLToPath(new URL('./tests', import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
target: 'es2015',
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.js'),
|
||||
name: 'vue-select',
|
||||
fileName: (format) => `vue-select.${format}.js`,
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: { vue: 'Vue' },
|
||||
assetFileNames(chunk): string {
|
||||
if (chunk.name === 'style.css') {
|
||||
return 'vue-select.css'
|
||||
}
|
||||
return chunk.name || ''
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
coverage: {
|
||||
reporter: ['lcov'],
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user