Skip to content

Commit

Permalink
Improve compatibility with monorepos and rspack (#48)
Browse files Browse the repository at this point in the history
Co-authored-by: Richie Bendall <[email protected]>
  • Loading branch information
ahabhgk and Richienb authored Oct 9, 2023
1 parent a05b45d commit 3474abf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
const {ProvidePlugin} = require('webpack');
const filterObject = require('filter-obj');

function createAliasFilter({includeAliases, excludeAliases}) {
Expand All @@ -26,7 +25,7 @@ module.exports = class NodePolyfillPlugin {
apply(compiler) {
const filter = createAliasFilter(this.options);

compiler.options.plugins.push(new ProvidePlugin(filter({
compiler.options.plugins.push(new compiler.webpack.ProvidePlugin(filter({
Buffer: [require.resolve('buffer/'), 'Buffer'],
console: require.resolve('console-browserify'),
process: require.resolve('process/browser')
Expand Down

0 comments on commit 3474abf

Please sign in to comment.