mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-06 07:00:39 +00:00
Add HMR and React Fast Refresh support (#12060)
* Add HMR and React Fast Refresh support * Run pre-commit hooks * Fix 'hmrSetModule' module loading The incoming module needs to include the URL from which it was loaded, so that it's possible to enforce only loading modules imported from the same pathname as the current module. * Add error handling and improvements - Add error handling to `useRemotePlugin` and simplify `RemoteComponent` - Improve HMR to use a registry instead of a single global callback. This should now handle two legacy plugin entry points being used at the same time via RemoteComponent. * Update docs * Update CHANGELOG * Remove use of LanguageContext from RemoteComponent LanguageContext should not be necessary here, as it's provided in ThemeContext, which is used in InvenTree's frontend entry. * Fix incorrect import.meta.hot access * Update Playwright test to match UI text changes --------- Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
@@ -174,7 +174,7 @@ test('Plugins - Panels', async ({ browser }) => {
|
||||
|
||||
// Check out each of the plugin panels
|
||||
await loadTab(page, 'Broken Panel');
|
||||
await page.getByText('Error occurred while loading plugin content').waitFor();
|
||||
await page.getByText('Error Loading Plugin Content').waitFor();
|
||||
await loadTab(page, 'Dynamic Panel');
|
||||
await page.getByText('Instance ID: 69');
|
||||
await page
|
||||
|
||||
Reference in New Issue
Block a user