Skip to content

Commit 83628ec

Browse files
committed
fix(build): enable source maps in development mode for better debugging
Signed-off-by: 7HR4IZ3 <90985774+7HR4IZ3@users.noreply.github.com>
1 parent e50a7b8 commit 83628ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

utils/esbuild.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async function processCssFile(filePath) {
4848
const postcssPlugins = postcssConfig.plugins || [];
4949
const processed = await postcss(postcssPlugins).process(css, {
5050
from: filePath,
51-
map: false,
51+
map: !isProd ? { inline: true } : false,
5252
});
5353

5454
return processed.css;
@@ -62,7 +62,6 @@ const babelPlugin = {
6262
const result = await babel.transformAsync(source, {
6363
filename: args.path,
6464
configFile: path.join(root, ".babelrc"),
65-
babelrc: false,
6665
sourceType: "unambiguous",
6766
caller: {
6867
name: "esbuild",
@@ -120,7 +119,6 @@ async function run() {
120119
entryPoints: {
121120
main: "./src/main.js",
122121
console: "./src/lib/console.js",
123-
searchInFilesWorker: "./src/sidebarApps/searchInFiles/worker.js",
124122
},
125123
outdir,
126124
entryNames: "[name]",
@@ -132,6 +130,7 @@ async function run() {
132130
platform: "browser",
133131
target,
134132
minify: isProd,
133+
sourcemap: !isProd,
135134
define: {
136135
"process.env.NODE_ENV": JSON.stringify(mode),
137136
},

0 commit comments

Comments
 (0)