jamesandersen / string-replace-webpack-plugin

Replace string tokens in a bundle.
93 stars 27 forks source link

Replace only a certain part of the file #28

Open samyfox opened 7 years ago

samyfox commented 7 years ago

What I want is to replace only the matches between template tags.

Example: <template> foo bar </template> <script>this is after tags and I don't want that this could match</script>

In this example I want string-replace-webpack-plugin to be apply only on Foo Bar.

Is it possible to do this ?