Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@repixelcorp/hyper-pwt",
"version": "0.1.2",
"version": "0.1.3",
"description": "A faster, more modern, superior alternative for Mendix PWT.",
"repository": {
"type": "git",
Expand All @@ -10,7 +10,7 @@
"build": "rslib build",
"watch": "rslib build --watch",
"start": "pnpm build && node ./dist/cli.js",
"link": "pnpm build && npm link --force"
"package": "pnpm build && pnpm pack"
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
Expand Down
8 changes: 3 additions & 5 deletions src/configurations/hotReload/widget.proxy.js.template
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ function WidgetProxy(props) {
const setupViteClient = async () => {
await fetch(`${DEV_SERVER_URL}@vite/client`);

const clientModule = await import(`${DEV_SERVER_URL}@vite/client.mjs`);
const clientModule = await import(`${DEV_SERVER_URL}@vite/client.mjs?t=${Date.now()}`);

if (clientModule.createHotContext) {
viteClientRef.current = clientModule.createHotContext(`${DEV_SERVER_URL}src/${WIDGET_NAME}.tsx`);
viteClientRef.current = clientModule.createHotContext(`${DEV_SERVER_URL}src/${WIDGET_NAME}.tsx?t=${Date.now()}`);
}

setViteClientInitialized(true);
Expand All @@ -63,9 +63,7 @@ function WidgetProxy(props) {
.then(() => {
loadWidget();

viteClientRef.current.on('vite:beforeUpdate', () => {
console.log('beforeUpdate');

viteClientRef.current.on('vite:afterUpdate', () => {
loadWidget();
});
});
Expand Down
Loading