mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
fix issue with ws module for jsdom
This commit is contained in:
parent
cd5da2cc70
commit
6aca111ce0
28
package-lock.json
generated
28
package-lock.json
generated
@ -54,6 +54,25 @@
|
||||
"@types/through": "*"
|
||||
}
|
||||
},
|
||||
"@types/jsdom": {
|
||||
"version": "12.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-12.2.1.tgz",
|
||||
"integrity": "sha512-VnLP1qW70OkzpMVuFsJPhxeIzEW1y+t91Fa2rE+b3UZ3ZiTwB28pYrdNj58wa0AQ+dV7eIBcdMFl3ql9C+cc9g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"@types/tough-cookie": "*",
|
||||
"parse5": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"parse5": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz",
|
||||
"integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/lodash": {
|
||||
"version": "4.14.116",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz",
|
||||
@ -249,6 +268,12 @@
|
||||
"integrity": "sha512-+gqspH/N6YjpApp96/XzM2AZK4R0Bk2qb4e5o16indSvgblfFaAIxNV8BdJmbqfSAYUyZubLzvrmpvdVEmBq3A==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/tough-cookie": {
|
||||
"version": "2.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.5.tgz",
|
||||
"integrity": "sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/zxcvbn": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/zxcvbn/-/zxcvbn-4.4.0.tgz",
|
||||
@ -2284,8 +2309,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -47,6 +47,7 @@
|
||||
"@types/commander": "^2.12.2",
|
||||
"@types/form-data": "^2.2.1",
|
||||
"@types/inquirer": "^0.0.43",
|
||||
"@types/jsdom": "^12.2.1",
|
||||
"@types/lowdb": "^1.0.5",
|
||||
"@types/lunr": "^2.1.6",
|
||||
"@types/node": "^10.9.4",
|
||||
|
@ -1,3 +1,4 @@
|
||||
import * as jsdom from 'jsdom';
|
||||
import * as path from 'path';
|
||||
|
||||
import { AuthService } from 'jslib/services/auth.service';
|
||||
@ -33,8 +34,6 @@ import { UserService } from 'jslib/services/user.service';
|
||||
import { Program } from './program';
|
||||
|
||||
// Polyfills
|
||||
// tslint:disable-next-line
|
||||
const jsdom: any = require('jsdom');
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
|
||||
export class Main {
|
||||
|
@ -66,8 +66,14 @@ const config = {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
},
|
||||
module: { rules: moduleRules },
|
||||
module: {
|
||||
rules: moduleRules,
|
||||
// ref: https://github.com/socketio/socket.io-client/issues/933
|
||||
noParse: /ws/,
|
||||
},
|
||||
plugins: plugins,
|
||||
// ref: https://github.com/socketio/socket.io-client/issues/933
|
||||
externals: ['ws'],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
Loading…
Reference in New Issue
Block a user