Skip to content

Commit 3474abf

Browse files
ahabhgkRichienb
andauthored
Improve compatibility with monorepos and rspack (#48)
Co-authored-by: Richie Bendall <[email protected]>
1 parent a05b45d commit 3474abf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
const {ProvidePlugin} = require('webpack');
32
const filterObject = require('filter-obj');
43

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

29-
compiler.options.plugins.push(new ProvidePlugin(filter({
28+
compiler.options.plugins.push(new compiler.webpack.ProvidePlugin(filter({
3029
Buffer: [require.resolve('buffer/'), 'Buffer'],
3130
console: require.resolve('console-browserify'),
3231
process: require.resolve('process/browser')

0 commit comments

Comments
 (0)