/*
*/
1 parent dca93c8 commit fd09428Copy full SHA for fd09428
2 files changed
index.js
@@ -3,8 +3,7 @@ const path = require("path");
3
const fs = require('fs');
4
5
function stripJsonComments (data) {
6
- const re = new RegExp("\/\/(.*)","g");
7
- return data.replace(re,'');
+ return data.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, (m, g) => g ? "" : m);
8
}
9
10
module.exports = (relativeTsconfigPath = './tsconfig.json') => {
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "esbuild-ts-paths",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "Transform TS path alias to absolute paths for esbuild",
"main": "index.js",
"repository": "git@github.com:frankleng/esbuild-ts-paths.git",
0 commit comments