File tree Expand file tree Collapse file tree 2 files changed +37
-21
lines changed
packages/socket.io-client/support Expand file tree Collapse file tree 2 files changed +37
-21
lines changed Original file line number Diff line number Diff line change @@ -10,25 +10,15 @@ const banner = `/*!
10
10
* Released under the MIT License.
11
11
*/` ;
12
12
13
- module . exports = {
14
- input : "./build/esm/browser-entrypoint.js" ,
15
- output : [
16
- {
17
- file : "./dist/socket.io.js" ,
18
- format : "umd" ,
19
- name : "io" ,
20
- sourcemap : true ,
21
- banner,
22
- } ,
23
- {
24
- file : "./dist/socket.io.min.js" ,
25
- format : "umd" ,
26
- name : "io" ,
27
- sourcemap : true ,
28
- plugins : [ terser ( ) ] ,
29
- banner,
30
- } ,
31
- ] ,
13
+ const devBundle = {
14
+ input : "./build/esm-debug/browser-entrypoint.js" ,
15
+ output : {
16
+ file : "./dist/socket.io.js" ,
17
+ format : "umd" ,
18
+ name : "io" ,
19
+ sourcemap : true ,
20
+ banner,
21
+ } ,
32
22
plugins : [
33
23
nodeResolve ( {
34
24
browser : true ,
@@ -40,4 +30,28 @@ module.exports = {
40
30
plugins : [ "@babel/plugin-transform-object-assign" ] ,
41
31
} ) ,
42
32
] ,
33
+ }
34
+
35
+ const prodBundle = {
36
+ input : "./build/esm/browser-entrypoint.js" ,
37
+ output : {
38
+ file : "./dist/socket.io.min.js" ,
39
+ format : "umd" ,
40
+ name : "io" ,
41
+ sourcemap : true ,
42
+ plugins : [ terser ( ) ] ,
43
+ banner,
44
+ } ,
45
+ plugins : [
46
+ nodeResolve ( {
47
+ browser : true ,
48
+ } ) ,
49
+ babel ( {
50
+ babelHelpers : "bundled" ,
51
+ presets : [ [ "@babel/env" ] ] ,
52
+ plugins : [ "@babel/plugin-transform-object-assign" ] ,
53
+ } ) ,
54
+ ] ,
43
55
} ;
56
+
57
+ module . exports = [ devBundle , prodBundle ] ;
Original file line number Diff line number Diff line change 1
- const base = require ( "./rollup.config.umd.js" ) ;
1
+ const base = require ( "./rollup.config.umd.js" ) [ 1 ] ;
2
2
const alias = require ( "@rollup/plugin-alias" ) ;
3
+ const commonjs = require ( "@rollup/plugin-commonjs" ) ;
3
4
4
5
module . exports = {
5
6
...base ,
6
7
output : {
7
- ...base . output [ 1 ] ,
8
+ ...base . output ,
8
9
file : "./dist/socket.io.msgpack.min.js" ,
9
10
} ,
10
11
plugins : [
12
+ commonjs ( ) ,
11
13
alias ( {
12
14
entries : [
13
15
{
You can’t perform that action at this time.
0 commit comments