Skip to content

Commit

Permalink
LRSD-6743 client-extension.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nNilton authored and brianchandotcom committed Oct 14, 2024
1 parent 1e1e864 commit 86449f6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/

// @ts-ignore

// eslint-disable-next-line @liferay/no-absolute-import
import RefreshRuntime from '/@react-refresh';

/**
* @description This file is used ONLY and EXCLUSIVE for development
* When setting up the remote app, add this import
* http://localhost:3000/@vite/refresh.ts
*/

RefreshRuntime.injectIntoGlobalHook(window);
window.$RefreshReg$ = () => {};
window.$RefreshSig$ = () => (type) => type;

window.__vite_plugin_react_preamble_installed__ = true;

declare global {
interface Window {
$RefreshReg$: () => void;
$RefreshSig$: () => (type: string) => string;
__vite_plugin_react_preamble_installed__: boolean;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
liferay-testray-custom-element:
urls:
- http://localhost:5173/@vite/client
- http://localhost:5173/@vite/refresh.ts
- http://localhost:5173/src/main.tsx

0 comments on commit 86449f6

Please sign in to comment.