You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: process.NODE_ENV || "development",
|
|
|
|
entry: "./src",
|
|
|
|
target: "node",
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, "dist"),
|
|
|
|
filename: "index.js"
|
|
|
|
},
|
|
|
|
node: {
|
|
|
|
__dirname: false
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: "ts-loader",
|
|
|
|
exclude: /node_modules/
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpe?g|gif|svg)$/i,
|
|
|
|
use: [{ loader: "file-loader" }]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.node/i,
|
|
|
|
use: [{ loader: "node-loader" }, { loader: "file-loader" }]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: [".tsx", ".ts", ".js"]
|
|
|
|
}
|
|
|
|
};
|