20 lines
795 B
JavaScript
20 lines
795 B
JavaScript
/* 打包入口(esbuild → IIFE)。
|
|
*
|
|
* 顺序要求:先 import 编辑器模块 —— 它在模块顶层把 window.__iwbEditor 挂好(编辑器自带约定);
|
|
* glue.js 只在模块顶层声明函数,不读 window,故无 TDZ/顺序风险。
|
|
*
|
|
* manifest 不放在这里:esbuild 的打印器会把单引号改写成双引号,而 scripts/validate.mjs
|
|
* 只认单引号。manifest 走 build-plugin.mjs 的 banner 通道(原样写入),注册调用走 footer 通道。
|
|
*/
|
|
'use strict'
|
|
|
|
import './editor/index.js'
|
|
import editorCss from './editor.css'
|
|
import { createGlue } from './glue.js'
|
|
|
|
;(typeof window !== 'undefined' ? window : globalThis).__IWB_ANNOTATE_FACTORY__ = function (ctx) {
|
|
return createGlue(ctx, editorCss)
|
|
}
|
|
|
|
// build-rev: 2026-11-17 (cache-bust)
|