File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import sharp from 'sharp'
10
10
//$off
11
11
import babel from 'rollup-plugin-babel'
12
12
//$off
13
+ import json from 'rollup-plugin-json'
14
+ //$off
13
15
import resolve from 'rollup-plugin-node-resolve'
14
16
//$off
15
17
import { terser } from 'rollup-plugin-terser'
@@ -145,7 +147,7 @@ const getPlugins = (name: string) => ({
145
147
sizeSnapshot : sizeSnapshot ( ) ,
146
148
analyzer : analyze ( {
147
149
filename : `stats/${ name } .html` ,
148
- sourcemap : true
150
+ sourcemap : true ,
149
151
} ) ,
150
152
terser : terser (
151
153
minifyConfig ( {
@@ -155,6 +157,10 @@ const getPlugins = (name: string) => ({
155
157
graph : graphPlugin ( {
156
158
output : 'modules.dot' ,
157
159
} ) ,
160
+ json : json ( {
161
+ preferConst : true ,
162
+ indent : ' ' ,
163
+ } ) ,
158
164
} )
159
165
160
166
export async function rollupBabel ( name : string , plugin : * ) {
@@ -205,6 +211,7 @@ export async function rollupEffector() {
205
211
] ,
206
212
plugins : [
207
213
plugins . resolve ,
214
+ plugins . json ,
208
215
plugins . babel ,
209
216
plugins . graph ,
210
217
plugins . sizeSnapshot ,
@@ -237,6 +244,7 @@ export async function rollupEffector() {
237
244
input : String ( dir ( `packages/${ name } /index.js` ) ) ,
238
245
plugins : [
239
246
plugins . resolve ,
247
+ plugins . json ,
240
248
plugins . babel ,
241
249
plugins . replace ,
242
250
plugins . commonjs ,
@@ -322,6 +330,10 @@ export async function rollupEffectorForms() {
322
330
format : 'umd' ,
323
331
name : 'effectorForms' ,
324
332
sourcemap : true ,
333
+ globals : {
334
+ effector : 'effector' ,
335
+ react : 'React' ,
336
+ } ,
325
337
} )
326
338
}
327
339
}
@@ -392,6 +404,10 @@ export async function rollupEffectorReact() {
392
404
format : 'umd' ,
393
405
name : 'effectorReact' ,
394
406
sourcemap : true ,
407
+ globals : {
408
+ effector : 'effector' ,
409
+ react : 'React' ,
410
+ } ,
395
411
} )
396
412
}
397
413
}
@@ -479,6 +495,10 @@ export async function rollupEffectorVue() {
479
495
format : 'umd' ,
480
496
name : 'effectorVue' ,
481
497
sourcemap : true ,
498
+ globals : {
499
+ effector : 'effector' ,
500
+ vue : 'Vue' ,
501
+ } ,
482
502
} )
483
503
}
484
504
}
You can’t perform that action at this time.
0 commit comments