Changed the audio lib require path

canary
WolverinDEV 2020-09-01 14:39:35 +02:00
parent 612edd4bb7
commit 414938c335
4 changed files with 7 additions and 6 deletions

View File

@ -12,7 +12,7 @@
"paths": {
"*": ["shared/declarations/*"],
"tc-shared/*": ["shared/js/*"],
"tc-backend/web/assembly/*": ["web/native-codec/generated/*"], /* specific web part */
"tc-backend/audio-lib/*": ["web/audio-lib/pkg/*"], /* specific web part */
"tc-backend/web/*": ["web/app/*"], /* specific web part */
"tc-backend/*": ["shared/backend.d/*"],
"tc-loader": ["loader/exports/loader.d.ts"],

View File

@ -1,4 +1,4 @@
import * as lib from "../../../audio-lib/pkg/index";
import * as lib from "tc-backend/audio-lib/index";
export type AudioLibrary = (typeof lib) & {
memory: WebAssembly.Memory

View File

@ -4,8 +4,8 @@
*/
module.exports = {
getAudioLibraryInstance() {
return import("../../../audio-lib/pkg/index_bg.wasm").then(wasm => {
return import("../../../audio-lib/pkg/index").then(pkg => {
return import("tc-backend/audio-lib/index_bg.wasm").then(wasm => {
return import("tc-backend/audio-lib/index").then(pkg => {
return Object.assign(pkg, { memory: wasm.memory });
});
});

View File

@ -10,7 +10,7 @@ export = () => config_base.config("web").then(config => {
Object.assign(config.resolve.alias, {
"tc-shared": path.resolve(__dirname, "shared/js"),
"tc-backend/web/assembly": path.resolve(__dirname, "web/native-codec/generated"),
"tc-backend/audio-lib": path.resolve(__dirname, "web/audio-lib/pkg"),
"tc-backend/web": path.resolve(__dirname, "web/app"),
"tc-backend": path.resolve(__dirname, "web/app"),
});
@ -22,6 +22,7 @@ export = () => config_base.config("web").then(config => {
crateDirectory: path.resolve(__dirname, "web", "audio-lib"),
outName: "index",
//forceMode: "profiling",
outDir: "pkg" }));
outDir: "pkg"
}));
return Promise.resolve(config);
});