Error: Cannot find module './mime-node' #19080
-
Bug reportWhat is the current behavior? If the current behavior is a bug, please provide the steps to reproduce. What is the expected behavior? Other relevant information: Webpack Conifg export default {
entry: './main.js',
output: {
filename: 'webpack-output.js',
path: 'C:\\.....................\\webpack-output',
},
module: {
rules: [
{
test: /.node$/,
loader: 'node-loader',
},
],
},
externals: [
({ context, request }, callback) => {
if (/.node$/.test(request)) {
return callback(null, 'commonjs ' + request);
}
callback();
},
],
target: 'node',
mode: 'production',
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Please do not ignore this, otherwise we will not be able to help you. |
Beta Was this translation helpful? Give feedback.
@Probabilities Bad regex -
/.node$/
, use/\.node$/
, because/.node$/.test('./mime-node')
istrue
I.E.: