-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: client compatibility with IE11/IE10/IE9 (#3129)
- Loading branch information
1 parent
3d91e69
commit 1e3e656
Showing
43 changed files
with
6,848 additions
and
7,455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict'; | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
require('core-js/stable/symbol'); | ||
|
||
module.exports = require('webpack/lib/logging/runtime'); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
client-src/default/utils/createSocketUrl.js → client-src/utils/createSocketUrl.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
'use strict'; | ||
|
||
const log = require('../../transpiled-modules/log'); | ||
const logger = require('../modules/logger'); | ||
|
||
const name = 'webpack-dev-server'; | ||
// default level is set on the client side, so it does not need | ||
// to be set by the CLI or API | ||
const defaultLevel = 'info'; | ||
|
||
function setLogLevel(level) { | ||
log.configureDefaultLogger({ | ||
level, | ||
}); | ||
logger.configureDefaultLogger({ level }); | ||
} | ||
|
||
setLogLevel(defaultLevel); | ||
|
||
module.exports = { | ||
log: log.getLogger(name), | ||
setLogLevel, | ||
}; | ||
module.exports = { log: logger.getLogger(name), setLogLevel }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
client-src/default/utils/sendMessage.js → client-src/utils/sendMessage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const { merge } = require('webpack-merge'); | ||
|
||
const baseForModules = { | ||
devtool: false, | ||
mode: 'development', | ||
output: { | ||
path: path.resolve(__dirname, '../client/modules'), | ||
libraryTarget: 'commonjs2', | ||
}, | ||
target: webpack.webpack ? ['web', 'es5'] : 'web', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
module.exports = [ | ||
merge(baseForModules, { | ||
entry: path.join(__dirname, 'modules/logger/index.js'), | ||
output: { | ||
filename: 'logger/index.js', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: [ | ||
{ | ||
loader: 'babel-loader', | ||
options: { | ||
plugins: ['@babel/plugin-transform-object-assign'], | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new webpack.NormalModuleReplacementPlugin( | ||
/^tapable\/lib\/SyncBailHook/, | ||
path.join(__dirname, 'modules/logger/SyncBailHookFake.js') | ||
), | ||
], | ||
}), | ||
merge(baseForModules, { | ||
entry: path.join(__dirname, 'modules/strip-ansi/index.js'), | ||
output: { | ||
filename: 'strip-ansi/index.js', | ||
}, | ||
}), | ||
merge(baseForModules, { | ||
entry: path.join(__dirname, 'modules/sockjs-client/index.js'), | ||
output: { | ||
filename: 'sockjs-client/index.js', | ||
library: 'SockJS', | ||
libraryTarget: 'umd', | ||
globalObject: "(typeof self !== 'undefined' ? self : this)", | ||
}, | ||
}), | ||
]; |
Oops, something went wrong.