import path from 'path' ; import { WebpackConfigPart } from '../types' ; const commonWebpackConfig = { entry : { index : path . resolve ( process . cwd ( ) , './src/index.ts' ) , } , output : { filename : '[name].js' , path : path . resolve ( process . cwd ( ) , './build' ) , } , mode : process . env . NODE_ENV , target : 'node' , module : { rules : [ { test : /\.tsx?$/ , use : 'ts-loader' , exclude : /node_modules/ , } , ] , } , resolve : { extensions : [ '.js' , '.jsx' , '.ts' , '.tsx' , '.d.ts' ] , } , } ; export default commonWebpackConfig ;