Skip to content

Commit c97dc73

Browse files
committed
[DevTools] Stop polyfilling Buffer
1 parent 06d2c8b commit c97dc73

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

packages/react-devtools-extensions/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ module.exports = {
119119
plugins: [
120120
new Webpack.ProvidePlugin({
121121
process: 'process/browser',
122-
Buffer: ['buffer', 'Buffer'],
123122
}),
124123
new Webpack.DefinePlugin({
125124
__DEV__,

packages/react-devtools-fusebox/webpack.config.frontend.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ module.exports = {
7474
new MiniCssExtractPlugin(),
7575
new Webpack.ProvidePlugin({
7676
process: 'process/browser',
77-
Buffer: ['buffer', 'Buffer'],
7877
}),
7978
new Webpack.DefinePlugin({
8079
__DEV__,

packages/react-devtools-inline/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ module.exports = {
6565
plugins: [
6666
new Webpack.ProvidePlugin({
6767
process: 'process/browser',
68-
Buffer: ['buffer', 'Buffer'],
6968
}),
7069
new Webpack.DefinePlugin({
7170
__DEV__,

packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,7 @@ export async function loadSourceAndMetadata(
119119
}
120120

121121
function decodeBase64String(encoded: string): Object {
122-
if (typeof atob === 'function') {
123-
return atob(encoded);
124-
} else if (
125-
typeof Buffer !== 'undefined' &&
126-
Buffer !== null &&
127-
typeof Buffer.from === 'function'
128-
) {
129-
return Buffer.from(encoded, 'base64');
130-
} else {
131-
throw Error('Cannot decode base64 string');
132-
}
122+
return atob(encoded);
133123
}
134124

135125
function extractAndLoadSourceMapJSON(

0 commit comments

Comments
 (0)