check:no-free-identifiers counts __DX_LOCALE_SRI__ as build-bound: the locale plugin prepends it, and its one read is typeof-guarded
This commit is contained in:
parent
a89c4f2e72
commit
c0ffb13f86
1 changed files with 4 additions and 0 deletions
|
|
@ -75,6 +75,10 @@ const GLOBALS = [
|
|||
// Build-time defines: vite REPLACES these before the browser ever sees them (vite.config.js
|
||||
// `define`), so they are bound by the bundler rather than by the file.
|
||||
'__DOXA_TREE_NAME__', '__DOXA_QA__',
|
||||
// Bound by the build too, but by a transform rather than `define`: with DX_SHIP_ONE_LOCALE the
|
||||
// i18nAreasPlugin prepends `const __DX_LOCALE_SRI__ = {…}` to library/i18n/index.js; without it the
|
||||
// name does not exist, which is why its one read sits behind `typeof … !== 'undefined'`.
|
||||
'__DX_LOCALE_SRI__',
|
||||
]
|
||||
const PRELUDE = new Set([...VUE_MACROS, ...GLOBALS])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue