diff --git a/index.js b/index.js index a540535..27c5562 100644 --- a/index.js +++ b/index.js @@ -6,5 +6,9 @@ module.exports = function(source) { this.cacheable && this.cacheable(); var value = typeof source === "string" ? JSON.parse(source) : source; this.value = [value]; - return "module.exports = " + JSON.stringify(value, undefined, "\t") + ";"; + return "module.exports = " + + JSON.stringify(value, undefined, "\t") + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029') + + ";"; }