39 строки
1.1 KiB
JavaScript
39 строки
1.1 KiB
JavaScript
const path = require("path");
|
|
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");
|
|
const appDir = path.resolve(__dirname, "./app");
|
|
const outDir = path.resolve(__dirname, "./dist");
|
|
|
|
module.exports = {
|
|
entry: {
|
|
"message-system": path.resolve(__dirname, "./src/message-system/webworker.ts"),
|
|
},
|
|
output: {
|
|
path: outDir,
|
|
filename: "[name].min.js",
|
|
},
|
|
mode: "production",
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /.tsx?$/,
|
|
use: [
|
|
{
|
|
loader: "ts-loader",
|
|
options: {
|
|
onlyCompileBundledFiles: true,
|
|
compilerOptions: {
|
|
declaration: false,
|
|
},
|
|
configFile: "tsconfig.esm.json",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
plugins: [new ResolveTypeScriptPlugin()],
|
|
extensions: [".js", ".tsx", ".ts", ".json"],
|
|
},
|
|
};
|