UNPKG

lynx-intlayer

Version:

A Lynx plugin for seamless internationalization (i18n) and localization (l10n) of your mobile app.

52 lines 1.95 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var pluginIntlayerLynx_exports = {}; __export(pluginIntlayerLynx_exports, { pluginIntlayerLynx: () => pluginIntlayerLynx }); module.exports = __toCommonJS(pluginIntlayerLynx_exports); var import_chokidar = require("@intlayer/chokidar"); var import_config = require("@intlayer/config"); const pluginIntlayerLynx = () => { return { name: "plugin-intlayer-lynx", async setup(api) { const configuration = (0, import_config.getConfiguration)(); await (0, import_chokidar.prepareIntlayer)(configuration); if (configuration.content.watch) { (0, import_chokidar.watch)({ configuration }); } api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => { return mergeRsbuildConfig(config, { resolve: { alias: { ...(0, import_config.getAlias)({ configuration }), react: import_config.ESMxCJSRequire.resolve("@lynx-js/react") } } }); }); } }; }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { pluginIntlayerLynx }); //# sourceMappingURL=pluginIntlayerLynx.cjs.map