From 1f02edf5b3e2f929ed55271e4db25b975b6c3d18 Mon Sep 17 00:00:00 2001 From: Ben Heidemann Date: Sat, 10 Apr 2021 10:59:37 +0100 Subject: [PATCH] refactor: remove buffer shim option from filer webpack plugin --- src/webpack-plugin/plugin.js | 9 +-------- src/webpack-plugin/processors.js | 1 - src/webpack-plugin/schema.js | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/webpack-plugin/plugin.js b/src/webpack-plugin/plugin.js index f9fbc10..764a1ae 100644 --- a/src/webpack-plugin/plugin.js +++ b/src/webpack-plugin/plugin.js @@ -23,7 +23,7 @@ module.exports = class FilerWebpackPlugin { // Resolve fsProvider if required if ( resolveData.request === 'fsProvider' - && resolveData.context === this.options.shimsDir + && resolveData.context === this.options.shimsDir ) { return this.resolveFsProvider(resolveData); } @@ -39,9 +39,6 @@ module.exports = class FilerWebpackPlugin { case 'path': if (!this.options.shimPath) return; return this.applyPathShim(resolveData); - case 'buffer': - if (!this.options.shimBuffer) return; - return this.applyBufferShim(resolveData); default: return; } @@ -81,8 +78,4 @@ module.exports = class FilerWebpackPlugin { applyPathShim(resolveData) { resolveData.request = path.join(this.options.shimsDir, 'path.js'); } - - applyBufferShim(resolveData) { - resolveData.request = path.join(this.options.shimsDir, 'buffer.js'); - } }; diff --git a/src/webpack-plugin/processors.js b/src/webpack-plugin/processors.js index dab2cc2..2a464bc 100644 --- a/src/webpack-plugin/processors.js +++ b/src/webpack-plugin/processors.js @@ -22,7 +22,6 @@ module.exports = { }, shimFs: { default: true }, shimPath: { default: true}, - shimBuffer: { default: true}, fsProvider: { default: 'default'}, fsProviderDir: { process: function(value) { diff --git a/src/webpack-plugin/schema.js b/src/webpack-plugin/schema.js index 0a6a4b7..807c32e 100644 --- a/src/webpack-plugin/schema.js +++ b/src/webpack-plugin/schema.js @@ -13,9 +13,6 @@ module.exports = { shimPath: { type: 'boolean', }, - shimBuffer: { - type: 'boolean', - }, fsProvider: { type: 'string', },