1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-05-18 14:09:05 +01:00
Files
frontend/build-scripts/get-built-in-node-module-shim.cjs
2026-05-06 10:55:53 +02:00

13 lines
576 B
JavaScript

/* global module */
// Browser-only replacement for core-js/internals/get-built-in-node-module.
// The original helper evaluates `Function('return require("...")')()`
// when it detects a Node environment, which causes a runtime
// ReferenceError on browsers (notably Safari 14) if environment
// detection mis-classifies the page. Since browser bundles never need to
// access Node built-in modules, return undefined unconditionally.
//
// Wired up via rspack `NormalModuleReplacementPlugin` in build-scripts/rspack.cjs.
module.exports = function () {
return undefined;
};