transfer from monorepo
This commit is contained in:
31
worker/tests/webpack.config.js
Normal file
31
worker/tests/webpack.config.js
Normal file
@ -0,0 +1,31 @@
|
||||
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()],
|
||||
};
|
Reference in New Issue
Block a user