2020-04-01 19:47:33 +00:00
|
|
|
import * as path from "path";
|
|
|
|
import * as config_base from "./webpack.config";
|
2020-09-01 12:43:04 +00:00
|
|
|
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
2020-04-01 13:36:37 +00:00
|
|
|
|
2020-04-09 17:26:56 +00:00
|
|
|
export = () => config_base.config("web").then(config => {
|
|
|
|
Object.assign(config.entry, {
|
2020-12-09 15:14:51 +00:00
|
|
|
"shared-app": "./web/app/index.ts",
|
|
|
|
"modal-external": "./web/app/index-external.ts"
|
2020-04-09 17:26:56 +00:00
|
|
|
});
|
2020-04-01 13:36:37 +00:00
|
|
|
|
2020-04-09 17:26:56 +00:00
|
|
|
Object.assign(config.resolve.alias, {
|
|
|
|
"tc-shared": path.resolve(__dirname, "shared/js"),
|
2020-09-01 12:39:35 +00:00
|
|
|
"tc-backend/audio-lib": path.resolve(__dirname, "web/audio-lib/pkg"),
|
2020-08-05 14:34:39 +00:00
|
|
|
"tc-backend/web": path.resolve(__dirname, "web/app"),
|
|
|
|
"tc-backend": path.resolve(__dirname, "web/app"),
|
2020-04-09 17:26:56 +00:00
|
|
|
});
|
2020-04-01 13:36:37 +00:00
|
|
|
|
2020-08-05 16:25:08 +00:00
|
|
|
config.node = config.node || {};
|
|
|
|
config.node["fs"] = "empty";
|
|
|
|
|
2020-09-01 12:43:04 +00:00
|
|
|
config.plugins.push(new WasmPackPlugin({
|
2020-09-01 10:53:42 +00:00
|
|
|
crateDirectory: path.resolve(__dirname, "web", "audio-lib"),
|
|
|
|
outName: "index",
|
|
|
|
//forceMode: "profiling",
|
2020-09-01 12:39:35 +00:00
|
|
|
outDir: "pkg"
|
|
|
|
}));
|
2020-04-09 17:26:56 +00:00
|
|
|
return Promise.resolve(config);
|
|
|
|
});
|