({asset})
| 15 | |
| 16 | module.exports = new Transformer({ |
| 17 | async transform({asset}) { |
| 18 | let code = await asset.getCode(); |
| 19 | let json = JSON.parse(code); |
| 20 | let format = !asset.target || asset.target.outputFormat === 'commonjs' ? 'cjs' : 'esm'; |
| 21 | let res = compileStrings(json, {format}); |
| 22 | asset.type = 'js'; |
| 23 | asset.setCode(res); |
| 24 | return [asset]; |
| 25 | } |
| 26 | }); |
nothing calls this directly
no test coverage detected