File tree 1 file changed +53
-0
lines changed 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { defineBuildConfig } from "unbuild"
2
+ import pack from "./package.json"
3
+
4
+ const banner = `/*!
5
+ * Quran Meta library ${ pack . version }
6
+ *
7
+ * Released under the MIT license
8
+ */
9
+ `
10
+
11
+ export default defineBuildConfig ( {
12
+ declaration : true ,
13
+ rollup : {
14
+ emitCJS : true ,
15
+ output : {
16
+ banner : banner
17
+ }
18
+ } ,
19
+
20
+ entries : [
21
+ "./src/index" ,
22
+ {
23
+ builder : "mkdist" ,
24
+ input : "./src/" ,
25
+ outDir : "./lib_es" ,
26
+ format : "esm"
27
+ } ,
28
+ {
29
+ input : "src/" ,
30
+ outDir : "lib_cjs/" ,
31
+ format : "cjs" ,
32
+ ext : "cjs" ,
33
+ declaration : false
34
+ }
35
+ ] ,
36
+ hooks : {
37
+ "rollup:options" : ( ctx , option ) => {
38
+ option . output ?. push (
39
+ {
40
+ // file: "dist/index.js",
41
+ name : "quranMeta" ,
42
+ dir : "dist" ,
43
+ format : "umd" ,
44
+ // format: "iife",
45
+ exports : "auto" ,
46
+ preferConst : true ,
47
+ externalLiveBindings : false ,
48
+ freeze : false
49
+ }
50
+ )
51
+ }
52
+ }
53
+ } )
You can’t perform that action at this time.
0 commit comments