I have to node project that can be compiled: client.js and server.js
I want to have to separate bundled file e.g. client.bundle.js and server.bundle.js
This is my webpack config:
const path = require(‘path’);
module.exports = {
target: 'node',
entry: {
server:'./server.js',
client:'./client.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js'
},
};
server.bundle.js is working fine but client.bundle.js is logging multiple chars and finally throws an error.
enter image description here
server.js has imported following module:
const FtpSrv = require('ftp-srv');
client.js has imported following module:
const ftp = require("basic-ftp")
const express = require("express");
const path = require('path')
const app = express();
const formidable = require('formidable');
const client = new ftp.Client()