Skip to content

A rollup plugin wrapper for the "replace-in-file" node package. Will run after the bundle is generated to honor any async file operations.

Notifications You must be signed in to change notification settings

droplab/rollup-plugin-string-replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-string-replacer

A rollup plugin wrapper for the "replace-in-file" node package. Will run after the bundle is generated to honor any async file operations.

Usage

import stringReplacer from 'rollup-plugin-string-replacer'

explort default {
	'input': 'src/app.js',
	'output': 
	{
		...
	},
	'plugins': 
	[
		stringReplacer({
			'files': 'path',	// (string|array|glob)
			'from': 'text',		// (string|array|regex|function)
			'to': 'text',		// (string|array|function)
			'options': {}		// passthru options for replace-in-file
		})
	]
}

More Info

See replace-in-file documentation for more usage details, https://github.com/adamreisnz/replace-in-file

About

A rollup plugin wrapper for the "replace-in-file" node package. Will run after the bundle is generated to honor any async file operations.

Resources

Stars

Watchers

Forks

Packages

No packages published