Source map support
This commit is contained in:
1 parent
ee32d49cd3
commit
40f7855754
3 files changed
+44
No files matched your search
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user