transfer from monorepo
This commit is contained in:
41
worker/webpack.config.mjs
Normal file
41
worker/webpack.config.mjs
Normal file
@ -0,0 +1,41 @@
|
||||
import path from "path";
|
||||
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",
|
||||
clean: true
|
||||
},
|
||||
target: "node",
|
||||
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"]
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: {
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
transpileOnly: true
|
||||
}
|
||||
},
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
||||
],
|
||||
devtool: "source-map",
|
||||
};
|
Reference in New Issue
Block a user