You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
434 B

import path from 'path';
import { fileURLToPath } from 'url';
import nodeExternals from 'webpack-node-externals';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
let config = {
entry: './server.js',
output: {
filename: 'server.min.cjs',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'commonjs2',
clean: true
},
target: 'node',
externals: [nodeExternals()]
}
export default config;