2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-31 14:05:14 +00:00

Now with sourcemap

This commit is contained in:
nanaya
2022-02-04 05:00:21 +09:00
parent 288ff2e5bd
commit 80dfaaf2ac

View File

@@ -15,9 +15,12 @@ const babelOnEnd = {
const result = babel.transformSync(fs.readFileSync(outfileEsbuild), {
presets: [
['@babel/preset-env']
]
],
inputSourceMap: JSON.parse(fs.readFileSync(`${outfileEsbuild}.map`)),
sourceMaps: true
})
fs.writeFileSync(outfileBabel, result.code)
fs.writeFileSync(outfileBabel, `${result.code}\n//# sourceMappingURL=application.js.map`)
fs.writeFileSync(`${outfileBabel}.map`, JSON.stringify(result.map))
})
}
}