@shaper.org/vite-react-plugin 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/templates/main.ts +0 -21
package/package.json
CHANGED
package/templates/main.ts
CHANGED
|
@@ -104,13 +104,6 @@ export class ReactRouteMonitor {
|
|
|
104
104
|
|
|
105
105
|
this.sendAllRoutes = this.sendAllRoutes.bind(this);
|
|
106
106
|
window.addEventListener("getroutes", this.sendAllRoutes);
|
|
107
|
-
|
|
108
|
-
this.iframeClient.onMessage((event) => {
|
|
109
|
-
const messageData = event.data;
|
|
110
|
-
if (messageData.type == "push-route") {
|
|
111
|
-
history.pushState({}, "", messageData.message.path);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
107
|
}
|
|
115
108
|
|
|
116
109
|
stop() {
|
|
@@ -245,17 +238,3 @@ const monitor = new ReactRouteMonitor({
|
|
|
245
238
|
|
|
246
239
|
monitor.start();
|
|
247
240
|
monitor.triggerRoutes();
|
|
248
|
-
|
|
249
|
-
// // simulate parent message
|
|
250
|
-
// setTimeout(() => {
|
|
251
|
-
// console.log("Simulating parent message");
|
|
252
|
-
// window.dispatchEvent(
|
|
253
|
-
// new MessageEvent("message", {
|
|
254
|
-
// data: {
|
|
255
|
-
// type: "push-route",
|
|
256
|
-
// message: { path: "/test" },
|
|
257
|
-
// },
|
|
258
|
-
// origin: "http://localhost:5173",
|
|
259
|
-
// }),
|
|
260
|
-
// );
|
|
261
|
-
// }, 1000);
|