Created
November 24, 2015 12:18
-
-
Save Deiru2k/8b1a82488656efa6996a to your computer and use it in GitHub Desktop.
StringReplace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ test: /\/src\/api.js$/, loader: StringReplacePlugin.replace({ | |
replacements: [ | |
{ | |
pattern: /@apiUrl@/ig, | |
replacement: function (match, p1, offset, string) { | |
return myUrls[process.env.NODE_ENV]; | |
} | |
} | |
]}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment