refactor: remove buffer shim option from filer webpack plugin
This commit is contained in:
parent
708c84fc63
commit
1f02edf5b3
|
@ -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');
|
||||
}
|
||||
};
|
||||
|
|
|
@ -22,7 +22,6 @@ module.exports = {
|
|||
},
|
||||
shimFs: { default: true },
|
||||
shimPath: { default: true},
|
||||
shimBuffer: { default: true},
|
||||
fsProvider: { default: 'default'},
|
||||
fsProviderDir: {
|
||||
process: function(value) {
|
||||
|
|
|
@ -13,9 +13,6 @@ module.exports = {
|
|||
shimPath: {
|
||||
type: 'boolean',
|
||||
},
|
||||
shimBuffer: {
|
||||
type: 'boolean',
|
||||
},
|
||||
fsProvider: {
|
||||
type: 'string',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue