-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathvite.config.ts
More file actions
39 lines (38 loc) · 907 Bytes
/
vite.config.ts
File metadata and controls
39 lines (38 loc) · 907 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
29
30
31
32
33
34
35
36
37
38
39
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import pocketMockPlugin from './plugin/vite-plugin-pocket-mock.js'
import dts from 'vite-plugin-dts'
export default defineConfig({
plugins: [
svelte({
compilerOptions: {
css: 'injected',
},
emitCss: false,
}),
pocketMockPlugin(),
dts({
include: ['src/**/*.ts', 'src/**/*.svelte'],
rollupTypes: true,
tsconfigPath: './tsconfig.app.json'
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
publicDir: false,
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'PocketMock',
fileName: (format) => `pocket-mock.${format}.js`
},
rollupOptions: {
external: [],
}
}
})