-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
vite.config.js
35 lines (32 loc) · 941 Bytes
/
vite.config.js
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
import { resolve } from 'node:path';
import url from 'node:url';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
export default defineConfig({
build: {
outDir: 'dist',
// These targets are not "support".
// A consuming app or library should compile further if they need to support
// old browsers.
target: ['esnext'],
// In case folks debug without sourcemaps
// (minifyication is an app decision, not a library one)
minify: false,
sourcemap: true,
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.ts'),
name: '@ember/string',
formats: ['es'],
// the proper extensions will be added
fileName: 'index',
},
},
plugins: [
dts({
rollupTypes: true,
outDir: 'declarations',
}),
],
});