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.
Translation/webpack.config.js

35 lines
653 B

const path = require("path");
module.exports = {
mode: process.NODE_ENV || "development",
entry: "./src",
target: "node",
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js"
},
5 years ago
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"]
}
};