mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-05 15:23:12 +00:00
17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
import path from "path";
|
|
|
|
import baseConfig from "../../karma.conf.cjs";
|
|
|
|
export default function (config) {
|
|
baseConfig(config);
|
|
|
|
const storageDir = path.resolve(__dirname, "src/message_channel/storage");
|
|
|
|
// Swap node storage for browser storage in webpack builds
|
|
config.webpack.resolve.alias = {
|
|
...config.webpack.resolve.alias,
|
|
[path.join(storageDir, "node.ts")]: path.join(storageDir, "browser.ts"),
|
|
[path.join(storageDir, "node.js")]: path.join(storageDir, "browser.ts")
|
|
};
|
|
}
|