-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (27 loc) · 803 Bytes
/
Copy pathvite.config.ts
File metadata and controls
28 lines (27 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { builtinModules } from 'module'
import path from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
import { viteStaticCopy } from 'vite-plugin-static-copy'
export default defineConfig({
plugins: [
viteStaticCopy({
targets: ['package.json', 'README.md', 'LICENSE', 'CHANGELOG.md', 'npm-shrinkwrap.json', 'package-lock.json'].map(item => ({
src: item,
dest: './'
})),
}),
dts({ tsconfigPath: './tsconfig.build.json' })
],
build: {
lib: {
formats: ['es'],
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'vite-plugin-laravel-i18next',
fileName: 'index',
},
rollupOptions: {
external: [...builtinModules, 'vite', 'chokidar', 'path', 'fs', 'glob', 'php-parser'],
},
},
})