Electron builder not copying my dist/node_modules directory in the right place

I’ve got one node application which I’m already launching with Electron. Now, I want to package it with electron-builder, but I’m dealing with such an strange behaviour. Usually, when I build my application, a dist folder gets generated, containing all the transpiled javascript files and also the package.json. Then, I have to run npm i --production again there to set up my production dependencies. So what I want electron-builder to do is to copy exactly the dist directory as it is once everything is installed: