Skip to content

Commit 7d21a6b

Browse files
authored
Update esbuild and remove sourcemaps (sst#1267)
1 parent 241bc63 commit 7d21a6b

File tree

5 files changed

+443
-7352
lines changed

5 files changed

+443
-7352
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"workspaces": [
77
"packages/*",
88
"packages/cli/test/*",
9-
"packages/cli/assets/console",
109
"packages/static-site-env/test/*"
1110
],
1211
"scripts": {

packages/cli/assets/console/package.json

-16
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@
2727
"storybook": "start-storybook -p 6006 -s public",
2828
"build-storybook": "build-storybook -s public"
2929
},
30-
"eslintConfig": {
31-
"extends": [
32-
"react-app",
33-
"react-app/jest"
34-
],
35-
"overrides": [
36-
{
37-
"files": [
38-
"**/*.stories.*"
39-
],
40-
"rules": {
41-
"import/no-anonymous-default-export": "off"
42-
}
43-
}
44-
]
45-
},
4630
"browserslist": {
4731
"production": [
4832
">0.2%",

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dendriform-immer-patch-optimiser": "^2.1.0",
3939
"dotenv": "^10.0.0",
4040
"dotenv-expand": "^5.1.0",
41-
"esbuild": "^0.12.20",
41+
"esbuild": "^0.14.11",
4242
"express": "^4.17.1",
4343
"fs-extra": "^9.0.1",
4444
"immer": "^9.0.7",

packages/core/src/runtime/handler/node.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ export const NodeHandler: Definition<Bundle> = (opts) => {
109109
...(bundle.externalModules || []),
110110
...(bundle.nodeModules || []),
111111
],
112-
sourcemap: "external",
113112
platform: "node",
114113
target: "node14",
115114
format: "cjs",
116115
outfile: target,
117116
};
117+
118118
const plugins = bundle.esbuildConfig?.plugins
119119
? path.join(opts.root, bundle.esbuildConfig.plugins)
120120
: undefined;
@@ -217,6 +217,9 @@ export const NodeHandler: Definition<Bundle> = (opts) => {
217217

218218
runAfterBundling(opts.srcPath, artifact, bundle);
219219

220+
// Remove sourcemaps if they weren't moved by hooks
221+
fs.removeSync(target + ".map");
222+
220223
return {
221224
directory: artifact,
222225
handler: path.join(opts.srcPath, opts.handler).replace(/\\/g, "/"),

0 commit comments

Comments
 (0)