json-perf-loader
Advanced tools
Comparing version
# Changelog | ||
## 1.0.8 - [2021-02-19] | ||
- Handle escaped double quotes in JSON ([#33](https://github.com/justjavac/json-perf-loader/pull/33)) | ||
## 1.0.7 - [2020-11-02] | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "json-perf-loader", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A loader for webpack to load JSON with performance advice", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -36,5 +36,7 @@ const { getOptions } = require('loader-utils') | ||
return `module.exports = JSON.parse(\`${JSON.stringify(value)}\`)` | ||
// the outer JSON.stringify is parsed by JavaScript | ||
// the inner JSON.stringify is parsed by JSON.parse | ||
return `module.exports = JSON.parse(${JSON.stringify(JSON.stringify(value))})` | ||
} | ||
exports.raw = true |
8388
3.05%39
5.41%