From ec5d459c3e8c6115cc26145be09ff430cb66a9ce Mon Sep 17 00:00:00 2001 From: Lave Gupta Date: Wed, 15 Jan 2025 14:43:07 +0530 Subject: [PATCH] PREAPPS-8189: Added preact-markup to shim --- src/shims/index.js | 1 + src/shims/preact-markup/index.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/shims/preact-markup/index.js diff --git a/src/shims/index.js b/src/shims/index.js index 0a032a6..2258e39 100644 --- a/src/shims/index.js +++ b/src/shims/index.js @@ -27,6 +27,7 @@ exports.SHIMMED_MODULES = [ 'preact-pwa-install', 'preact-i18n', 'preact-render-to-string', + 'preact-markup', ['@zimbra-client/util', 'redux', 'contacts'], // Multiple shim files under one alias (@zimbra/util, @zimbra/util/redux, @zimbra/util/contacts) '@zimbra-client/blocks', '@zimbra-client/components', diff --git a/src/shims/preact-markup/index.js b/src/shims/preact-markup/index.js new file mode 100644 index 0000000..17e7cc0 --- /dev/null +++ b/src/shims/preact-markup/index.js @@ -0,0 +1,12 @@ +/** This file is an auto-generated shim, aliased in for "preact-markup" in the webpack config. +* When components import 'preact-markup', we want to give them back the copy +* Zimbra passed down when it called the factory provided to zimlet(). +*/ + +/* eslint-disable camelcase, dot-notation */ +import { warnOnMissingExport } from '../'; +const wrap = warnOnMissingExport.bind(null, global.shims['preact-markup'], 'preact-markup'); + +export const setReviver = wrap('setReviver'); + +export default global.shims['preact-markup'];