mirror of
https://github.com/moebooru/moebooru
synced 2025-08-31 14:05:14 +00:00
Now with sourcemap
This commit is contained in:
7
build.js
7
build.js
@@ -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))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user