Changed the audio lib require path
parent
612edd4bb7
commit
414938c335
|
@ -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"],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 });
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
});
|
Loading…
Reference in New Issue