refactor: remove buffer shim option from filer webpack plugin

This commit is contained in:
Ben Heidemann 2021-04-10 10:59:37 +01:00 committed by David Humphrey
parent 708c84fc63
commit 1f02edf5b3
3 changed files with 1 additions and 12 deletions

View File

@ -23,7 +23,7 @@ module.exports = class FilerWebpackPlugin {
// Resolve fsProvider if required // Resolve fsProvider if required
if ( if (
resolveData.request === 'fsProvider' resolveData.request === 'fsProvider'
&& resolveData.context === this.options.shimsDir && resolveData.context === this.options.shimsDir
) { ) {
return this.resolveFsProvider(resolveData); return this.resolveFsProvider(resolveData);
} }
@ -39,9 +39,6 @@ module.exports = class FilerWebpackPlugin {
case 'path': case 'path':
if (!this.options.shimPath) return; if (!this.options.shimPath) return;
return this.applyPathShim(resolveData); return this.applyPathShim(resolveData);
case 'buffer':
if (!this.options.shimBuffer) return;
return this.applyBufferShim(resolveData);
default: default:
return; return;
} }
@ -81,8 +78,4 @@ module.exports = class FilerWebpackPlugin {
applyPathShim(resolveData) { applyPathShim(resolveData) {
resolveData.request = path.join(this.options.shimsDir, 'path.js'); resolveData.request = path.join(this.options.shimsDir, 'path.js');
} }
applyBufferShim(resolveData) {
resolveData.request = path.join(this.options.shimsDir, 'buffer.js');
}
}; };

View File

@ -22,7 +22,6 @@ module.exports = {
}, },
shimFs: { default: true }, shimFs: { default: true },
shimPath: { default: true}, shimPath: { default: true},
shimBuffer: { default: true},
fsProvider: { default: 'default'}, fsProvider: { default: 'default'},
fsProviderDir: { fsProviderDir: {
process: function(value) { process: function(value) {

View File

@ -13,9 +13,6 @@ module.exports = {
shimPath: { shimPath: {
type: 'boolean', type: 'boolean',
}, },
shimBuffer: {
type: 'boolean',
},
fsProvider: { fsProvider: {
type: 'string', type: 'string',
}, },