-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bundler.config.ts
44 lines (43 loc) · 1.04 KB
/
bundler.config.ts
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
40
41
42
43
44
import { defineConfig } from '@hypernym/bundler'
import { name, version } from './package.json'
import { nuxtMetaTemplate, nuxtTypesTemplate } from './src/utils/templates.js'
export default defineConfig({
entries: [
{
input: './src/module.ts',
externals: [/^@nuxt/],
plugins: {
replace: {
preventAssignment: true,
__name__: name,
__version__: version,
},
},
},
{
types: './src/types/module.ts',
output: './dist/module.d.ts',
},
{
input: './src/runtime/composables/index.ts',
output: './dist/runtime/composables/index.mjs',
externals: ['#imports'],
},
{
types: './src/types/runtime/composables/index.ts',
output: './dist/runtime/composables/index.d.ts',
},
{
template: true,
output: './dist/module.json',
content: nuxtMetaTemplate(),
format: 'json',
},
{
template: true,
output: './dist/types.d.ts',
content: nuxtTypesTemplate(),
format: 'dts',
},
],
})