mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-27 19:30:29 +00:00
Add best practice node modules aliasing
This commit is contained in:
parent
8a0238768d
commit
3bf4e10902
1 changed files with 7 additions and 0 deletions
|
|
@ -61,5 +61,12 @@ module.exports = function exports() {
|
|||
// Add webpack version information
|
||||
version: false,
|
||||
},
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue