File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 56
56
"prettier" : " ^2.1.2" ,
57
57
"socket.io" : " 3.0.0-rc2" ,
58
58
"socket.io-browsers" : " ^1.0.0" ,
59
+ "socket.io-msgpack-parser" : " ^3.0.0" ,
59
60
"text-blob-builder" : " 0.0.1" ,
60
61
"ts-loader" : " ^8.0.5" ,
61
62
"ts-node" : " ^9.0.0" ,
72
73
"test" : " npm run format:check && npm run compile && if test \" $BROWSERS\" = \" 1\" ; then npm run test:browser; else npm run test:node; fi" ,
73
74
"test:node" : " mocha --require ts-node/register --reporter dot --require test/support/server.js test/index.js" ,
74
75
"test:browser" : " zuul test/index.js" ,
75
- "build" : " npm run compile && webpack --config ./support/webpack.config.js --config ./support/prod.config.js" ,
76
+ "build" : " npm run compile && webpack --config ./support/webpack.config.js --config ./support/prod.config.js --config ./support/msgpack-parser.config.js " ,
76
77
"format:check" : " prettier --check 'lib/**/*.ts' 'test/**/*.js' 'test/**/*.ts' 'support/**/*.js'" ,
77
78
"format:fix" : " prettier --write 'lib/**/*.ts' 'test/**/*.js' 'test/**/*.ts' 'support/**/*.js'" ,
78
79
"prepack" : " npm run compile"
Original file line number Diff line number Diff line change
1
+ const { NormalModuleReplacementPlugin } = require ( "webpack" ) ;
2
+ const config = require ( "./prod.config" ) ;
3
+
4
+ module . exports = {
5
+ ...config ,
6
+ output : {
7
+ ...config . output ,
8
+ filename : "socket.io.msgpack.min.js" ,
9
+ } ,
10
+ plugins : [
11
+ ...config . plugins ,
12
+ new NormalModuleReplacementPlugin (
13
+ / ^ s o c k e t .i o - p a r s e r $ / ,
14
+ "socket.io-msgpack-parser"
15
+ ) ,
16
+ ] ,
17
+ } ;
You can’t perform that action at this time.
0 commit comments