diff --git a/index.js b/index.js index f1c95c6..bd56158 100644 --- a/index.js +++ b/index.js @@ -5,5 +5,8 @@ module.exports = function(content) { this.cacheable && this.cacheable(); this.value = content; - return "export default " + JSON.stringify(content); + content = JSON.stringify(content) + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029'); + return "export default " + content; }