import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default { entry: './scripts/ExportToAi/ich.ts', target: 'node', mode: 'production', output: { path: path.resolve(__dirname, 'dist'), filename: 'ich-bundle.cjs', clean: true, }, resolve: { extensions: ['.ts', '.js'], alias: { '@': path.resolve(__dirname), } }, optimization: { minimize: false, }, devtool: 'source-map', module: { rules: [ { test: /\.ts$/, use: { loader: 'ts-loader', options: { configFile: 'tsconfig.ich.json', }, }, exclude: /node_modules/, }, ], }, externals: { fs: 'commonjs fs', path: 'commonjs path', }, node: { __dirname: true, __filename: true, }, };