mirror of https://github.com/vector-im/riot-web
Merge pull request #7552 from vector-im/travis/permalink-routing
Mock fs, tls, and net to support request in the browserpull/7615/head
commit
cebba5bfa3
File diff suppressed because it is too large
Load Diff
|
@ -125,6 +125,7 @@
|
||||||
"karma-webpack": "4.0.0-beta.0",
|
"karma-webpack": "4.0.0-beta.0",
|
||||||
"matrix-mock-request": "^1.2.0",
|
"matrix-mock-request": "^1.2.0",
|
||||||
"matrix-react-test-utils": "^0.2.0",
|
"matrix-react-test-utils": "^0.2.0",
|
||||||
|
"memfs": "^2.10.1",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
|
|
|
@ -106,8 +106,21 @@ module.exports = {
|
||||||
|
|
||||||
// same goes for js-sdk
|
// same goes for js-sdk
|
||||||
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),
|
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),
|
||||||
|
|
||||||
|
// To make webpack happy
|
||||||
|
// Related: https://github.com/request/request/issues/1529
|
||||||
|
// (there's no mock available for fs, so we fake a mock by using
|
||||||
|
// an in-memory version of fs)
|
||||||
|
"fs": "memfs",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
node: {
|
||||||
|
// Because webpack is made of fail
|
||||||
|
// https://github.com/request/request/issues/1529
|
||||||
|
// Note: 'mock' is the new 'empty'
|
||||||
|
net: 'mock',
|
||||||
|
tls: 'mock'
|
||||||
|
},
|
||||||
externals: {
|
externals: {
|
||||||
// Don't try to bundle electron: leave it as a commonjs dependency
|
// Don't try to bundle electron: leave it as a commonjs dependency
|
||||||
// (the 'commonjs' here means it will output a 'require')
|
// (the 'commonjs' here means it will output a 'require')
|
||||||
|
|
Loading…
Reference in New Issue