diff --git a/changes.md b/changes.md index 5dfe98360..2f49808ea 100644 --- a/changes.md +++ b/changes.md @@ -2,6 +2,7 @@ ## Changes in dev 1. Add textendash and textemdash `TLatex` symbols #407 +1. Add `@vite-ignore` comment to dynamic imports to suppress Vite/Rollup analysis warnings 1. Let store canvas as html file via context menu 1. Improve `TGraph` update 1. When draw TH2/TF2 with "surf same" draw option, only lines are drawn diff --git a/modules/core.mjs b/modules/core.mjs index 605764ffe..4df0a19c4 100644 --- a/modules/core.mjs +++ b/modules/core.mjs @@ -1137,7 +1137,7 @@ async function injectCode(code) { }).then(_fs => { fs = _fs; fs.writeFileSync(name, code); - return import(/* webpackIgnore: true */ 'file://' + name); + return import(/* webpackIgnore: true */ /* @vite-ignore */ 'file://' + name); }).finally(() => fs.unlinkSync(name)); } @@ -1179,7 +1179,7 @@ async function loadModules(arg) { arg = arg.split(';'); if (!arg.length) return true; - return import(/* webpackIgnore: true */ arg.shift()).then(() => loadModules(arg)); + return import(/* webpackIgnore: true */ /* @vite-ignore */ arg.shift()).then(() => loadModules(arg)); } /** @summary Load script or CSS file into the browser @@ -1218,7 +1218,7 @@ async function loadScript(url) { if (url.indexOf('./') === 0) return import('fs').then(fs => injectCode(fs.readFileSync(url))); - return import(/* webpackIgnore: true */ url); + return import(/* webpackIgnore: true */ /* @vite-ignore */ url); } const match_url = src => { diff --git a/modules/gui/HierarchyPainter.mjs b/modules/gui/HierarchyPainter.mjs index 371a5ef01..fc0701d01 100644 --- a/modules/gui/HierarchyPainter.mjs +++ b/modules/gui/HierarchyPainter.mjs @@ -3212,7 +3212,7 @@ class HierarchyPainter extends BasePainter { case 'draw_tree': return import('../draw/TTree.mjs'); case 'hierarchy': return { HierarchyPainter, markAsStreamerInfo }; } - return import(/* webpackIgnore: true */ module); + return import(/* webpackIgnore: true */ /* @vite-ignore */ module); } /** @summary set cached object for gui drawing