()
| 232 | // size, where a browser loads the bundle and they'd outweigh arktype compiled |
| 233 | let chosen: PrecompileUnpluginOptions = {} |
| 234 | const updateWorker = () => { |
| 235 | // what's set, in the call or ark.json, isn't chosen over |
| 236 | const chose = { ...chosen, ...definedOf(set) } |
| 237 | const updated = environment ? withEnvironment(chose, environment) : chose |
| 238 | if (JSON.stringify(updated) === JSON.stringify(workerOptions)) return |
| 239 | workerOptions = updated |
| 240 | restart() |
| 241 | } |
| 242 | const setEnvironment = (bundlerEnvironment: Environment) => { |
| 243 | // compilers sharing the plugin, as Rsbuild's environments do, that |
| 244 | // build one for a browser and one for a server share its worker, so |
no test coverage detected