-
browserifySwap(file) → {TransformStream}
-
Looks up browserify_swap configuratios specified for the given file in the environment specified via
BROWSERIFYSWAP_ENV.If found the file content is replaced with a require statement to the file to swap in for the original. Otherwise the file's content is just piped through.
Parameters:
Name Type Description fileString full path to file being transformed
Returns:
transform stream into which
browserifywill pipe the original content of the file- Type
- TransformStream
browserify-swap
A transform that swaps out modules according to a config in your package.json selected via an environment variable.
MIT
5 个版本
安装
npm install browserify-swap
yarn add browserify-swap
pnpm add browserify-swap
bun add browserify-swap
