We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8260274 commit fd8210aCopy full SHA for fd8210a
webpack.config.js
@@ -42,7 +42,11 @@ module.exports = {
42
path: path.resolve(__dirname, 'dist'),
43
libraryTarget: 'commonjs2',
44
},
45
- externals: {
46
- '../build/Release/sharp.node': './build/Release/sharp.node',
47
- },
+ externals: ({ context, request }, callback) => {
+ if (/.node$/.test(request)) {
+ // if it's a binary, load as an external
48
+ return callback(null, 'commonjs ' + request);
49
+ }
50
+ callback();
51
52
};
0 commit comments