Commit 3b464d5 1 parent 2691697 commit 3b464d5 Copy full SHA for 3b464d5
File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,19 @@ Add the following scripts to your `package.json`:
106
106
}
107
107
```
108
108
109
+ ### ` --preset=microservice `
110
+
111
+ ``` js
112
+ {
113
+ ... defaultPreset,
114
+ format: ' esm' ,
115
+ treeShaking: true ,
116
+ outfile: ' dist/main.mjs' ,
117
+ mangleProps: ' _$' ,
118
+ target: ' node20'
119
+ }
120
+ ```
121
+
109
122
## Configuration
110
123
111
124
Add 'nano-build' field to your ` package.json ` for overwriting configuration:
Original file line number Diff line number Diff line change @@ -43,6 +43,13 @@ const defaultOptions = {
43
43
44
44
const presetRecord = {
45
45
default : defaultOptions ,
46
+ microservice : {
47
+ format : 'esm' ,
48
+ treeShaking : true ,
49
+ outfile : 'dist/main.mjs' ,
50
+ mangleProps : '_$' ,
51
+ target : 'node20'
52
+ } ,
46
53
module : {
47
54
format : 'esm' ,
48
55
cjs : true ,
You can’t perform that action at this time.
0 commit comments