vue-cli-plugin-i18n icon indicating copy to clipboard operation
vue-cli-plugin-i18n copied to clipboard

Installation fails if tsconfig.json contains comment

Open SegaraRai opened this issue 5 years ago • 0 comments

Since tsconfig.json allows comments (and trailing commas), some tsconfig.json cannot be parsed by JSON.parse(). https://github.com/kazupon/vue-cli-plugin-i18n/blob/master/generator/index.js#L136-L141

I found some libraries which can parse JSON with comments, but I'm not sure which one is suitable.

  • https://www.npmjs.com/package/comment-json
  • https://www.npmjs.com/package/json5
  • ~~https://www.npmjs.com/package/strip-json-comments~~
    • This one doesn't seem to support trailing commas.

SegaraRai avatar Feb 10 '20 12:02 SegaraRai