Files
Yiqun/worker/tests/webpack.config.js
2025-04-24 10:24:42 -03:00

32 lines
668 B
JavaScript

import path from 'path'
import Dotenv from 'dotenv-webpack'
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
mode: "development",
entry: "./src/index.ts",
output: {
filename: "main.js",
path: path.resolve(__dirname, "dist"),
libraryTarget: "commonjs2",
},
target: "node",
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
devtool: "source-map",
plugins: [new Dotenv()],
};