From 2e55c4c54830da358c185bf462ec0642e10c1b2d Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:53:56 +0200 Subject: [PATCH] bug: use production for webpack (#81) --- examples/dogfooding/src/index.ts | 6 +++--- examples/dogfooding/webpack.config.js | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/dogfooding/src/index.ts b/examples/dogfooding/src/index.ts index 8f87cb9..fa4e171 100644 --- a/examples/dogfooding/src/index.ts +++ b/examples/dogfooding/src/index.ts @@ -4,8 +4,8 @@ import { createDecoder, DecodedMessage, waitForRemotePeer, - DefaultPubsubTopic, LightNode, + utils } from "@waku/sdk"; import { Type, Field } from "protobufjs"; @@ -87,7 +87,7 @@ export async function app(telemetryClient: TelemetryClient) { sequenceTotal: sequenceTotal, sequenceIndex: sequenceIndex, contentTopic: DEFAULT_CONTENT_TOPIC, - pubsubTopic: DefaultPubsubTopic, + pubsubTopic: utils.contentTopicToPubsubTopic(DEFAULT_CONTENT_TOPIC), }, ]); @@ -145,7 +145,7 @@ export async function app(telemetryClient: TelemetryClient) { sequenceTotal: sequencedMessage.total, sequenceIndex: sequencedMessage.index, contentTopic: DEFAULT_CONTENT_TOPIC, - pubsubTopic: DefaultPubsubTopic, + pubsubTopic: utils.contentTopicToPubsubTopic(DEFAULT_CONTENT_TOPIC), }, ]); diff --git a/examples/dogfooding/webpack.config.js b/examples/dogfooding/webpack.config.js index c6b2898..cc7d368 100644 --- a/examples/dogfooding/webpack.config.js +++ b/examples/dogfooding/webpack.config.js @@ -23,7 +23,11 @@ module.exports = { }, ], }, - mode: "development", + mode: "production", + devtool: "source-map", + node: { + global: false + }, plugins: [ new CopyWebpackPlugin({ patterns: ["index.html", "favicon.ico", "favicon.png", "manifest.json"],