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
6 changes: 5 additions & 1 deletion react/src/components/LoginView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ const LoginView: React.FC<{
if (!sanitizedPlugin || sanitizedPlugin !== loginPlugin) return;

import(
/* webpackIgnore: true */
// `@vite-ignore` = Vite's equivalent of webpack's `webpackIgnore`.
// The path interpolates a user-config'd plugin name at runtime and
// sits OUTSIDE react/src — Vite would otherwise warn about the
// un-analyzable specifier on every dev rebuild.
/* @vite-ignore */
`../../../src/plugins/${sanitizedPlugin}`
).catch(() => {
setLoginError({ message: t('error.LoginFailed') });
Expand Down
5 changes: 4 additions & 1 deletion react/src/components/PluginLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ function PluginLoader() {
: `/dist/plugins/${sanitizedPage}.js`;

try {
await import(/* webpackIgnore: true */ pluginUrl);
// `@vite-ignore` = Vite's equivalent of webpack's `webpackIgnore`.
// pluginUrl is a runtime-computed path outside the module graph,
// so we opt out of static analysis entirely.
await import(/* @vite-ignore */ pluginUrl);

const pageItem = document.createElement(page) as PluginPageElement;
pageItem.classList.add('page');
Expand Down
Loading