const path = require ( 'path' ) ; const webpack = require ( 'webpack' ) ; const config = { mode : 'production' , entry : path . resolve ( __dirname , './server/main.ts' ) , target : 'node' , output : { filename : 'main.js' , path : path . resolve ( __dirname , '../../build/shadowbox/app' ) , } , module : { rules : [ { test : /\.ts(x)?$/ , use : 'ts-loader' } ] } , node : { __dirname : false } , plugins : [ new webpack . DefinePlugin ( { 'global.GENTLY' : false } ) ] , resolve : { extensions : [ '.tsx' , '.ts' , '.js' ] } } ; module . exports = config ;