Buckets:
| import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-BYkbbGqQ.mjs"; | |
| import { t as esmExternalRequirePlugin } from "./shared/constructors-CE6zZSUt.mjs"; | |
| //#region src/builtin-plugin/replace-plugin.ts | |
| /** | |
| * Replaces targeted strings in files while bundling. | |
| * | |
| * @example | |
| * **Basic usage** | |
| * ```js | |
| * replacePlugin({ | |
| * 'process.env.NODE_ENV': JSON.stringify('production'), | |
| * __buildVersion: 15 | |
| * }) | |
| * ``` | |
| * @example | |
| * **With options** | |
| * ```js | |
| * replacePlugin({ | |
| * 'process.env.NODE_ENV': JSON.stringify('production'), | |
| * __buildVersion: 15 | |
| * }, { | |
| * preventAssignment: false, | |
| * }) | |
| * ``` | |
| * | |
| * @see https://rolldown.rs/builtin-plugins/replace | |
| * @category Builtin Plugins | |
| */ | |
| function replacePlugin(values = {}, options = {}) { | |
| Object.keys(values).forEach((key) => { | |
| const value = values[key]; | |
| if (typeof value !== "string") values[key] = String(value); | |
| }); | |
| return makeBuiltinPluginCallable(new BuiltinPlugin("builtin:replace", { | |
| ...options, | |
| values | |
| })); | |
| } | |
| //#endregion | |
| export { esmExternalRequirePlugin, replacePlugin }; | |
Xet Storage Details
- Size:
- 1.08 kB
- Xet hash:
- a0cac7d5b675e1891136a3eb6f394bf6a1798f3f14ab0c966e1c8ffb5bd3197c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.