Source map support

This commit is contained in:
Zaid Abdulla committed 2019-07-25 19:28:12 -07:00
1 parent ee32d49cd3
commit 40f7855754
3 files changed
+44

No files matched your search

+16
View File
@@ -230,6 +230,8 @@ async function generateToolsJs(): Promise<void> {
await bundle.write({
format: "cjs",
preferConst: true,
sourcemap: "inline",
sourcemapExcludeSources: true,
banner: "#!/usr/bin/env node",
file: outputFile
});
@@ -287,6 +289,8 @@ async function generateBackendJs(): Promise<void> {
await bundle.write({
format: "cjs",
preferConst: true,
sourcemap: "inline",
sourcemapExcludeSources: true,
banner: "#!/usr/bin/env node",
file: outputFile
});
@@ -322,6 +326,8 @@ async function generateFrontendJs(): Promise<void> {
await bundle.write({
preferConst: true,
format: "esm",
sourcemap: "inline",
sourcemapExcludeSources: true,
file: outputFile
});
@@ -331,6 +337,16 @@ async function generateFrontendJs(): Promise<void> {
resolve: {
aliasFields: ["module"]
},
devtool: "nosources-source-map",
module: {
rules: [
{
test: /\.js$/,
use: ["source-map-loader"],
enforce: "pre"
}
]
},
output: {
path: path.resolve(OUTPUT_DIR, "public"),
filename: "app.js"