Skip to content

Commit fdd335d

Browse files
super duper
1 parent c60b62e commit fdd335d

File tree

18 files changed

+961
-79
lines changed

18 files changed

+961
-79
lines changed

esbuild.cjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,20 @@ const require = topLevelCreateRequire(import.meta.url);
112112

113113
// Bin builds:
114114
esbuild.build({
115-
entryPoints: ["src/bin/main.ts"],
116-
outfile: "dist/bin/codesandbox.cjs",
115+
entryPoints: ["src/bin/main.tsx"],
116+
outfile: "dist/bin/codesandbox.mjs",
117117
bundle: true,
118-
format: "cjs",
118+
format: "esm",
119119
platform: "node",
120120
banner: {
121121
js: `#!/usr/bin/env node\n\n`,
122122
},
123+
external: [
124+
...Object.keys(require("./package.json").dependencies || {}),
125+
...Object.keys(require("./package.json").devDependencies || {}),
126+
...require("module").builtinModules,
127+
"@codesandbox/sdk",
128+
],
123129
}),
124130
]).catch(() => {
125131
process.exit(1);

0 commit comments

Comments
 (0)