@samitouri / QOS-React / commits / 0ca3deebcf

[rcr] Fix incorrect output platform (#32569)

Accidentally copypasted the wrong esbuild config.

lauren committed Mar 11, 2025 at 10:41 UTC 0ca3deebcf20d2514771a568e1be08801da5cf85
2 files changed +1 -68
compiler/packages/react-compiler-runtime/scripts/build.js deleted
-67
@@ -1,67 +0,0 @@
1 -#!/usr/bin/env node
2 -
3 -/**
4 - * Copyright (c) Meta Platforms, Inc. and affiliates.
5 - *
6 - * This source code is licensed under the MIT license found in the
7 - * LICENSE file in the root directory of this source tree.
8 - */
9 -
10 -const esbuild = require('esbuild');
11 -const yargs = require('yargs');
12 -const path = require('path');
13 -const {Generator} = require('npm-dts');
14 -
15 -const argv = yargs(process.argv.slice(2))
16 - .options('w', {
17 - alias: 'watch',
18 - default: false,
19 - type: 'boolean',
20 - })
21 - .parse();
22 -
23 -const config = {
24 - entryPoints: [path.join(__dirname, '../src/index.ts')],
25 - outfile: path.join(__dirname, '../dist/index.js'),
26 - bundle: true,
27 - external: ['react'],
28 - format: 'cjs',
29 - platform: 'node',
30 - target: 'es6',
31 - banner: {
32 - js: `/**
33 - * Copyright (c) Meta Platforms, Inc. and affiliates.
34 - *
35 - * This source code is licensed under the MIT license found in the
36 - * LICENSE file in the root directory of this source tree.
37 - *
38 - * @lightSyntaxTransform
39 - * @noflow
40 - * @nolint
41 - * @preventMunge
42 - * @preserve-invariant-messages
43 - */
44 -
45 -"use no memo";`,
46 - },
47 -};
48 -
49 -async function main() {
50 - if (argv.w) {
51 - const ctx = await esbuild.context(config);
52 - await ctx.watch();
53 - console.log('watching for changes...');
54 - } else {
55 - await esbuild.build({
56 - sourcemap: true,
57 - minify: false,
58 - ...config,
59 - });
60 - await new Generator({
61 - entry: 'src/index.ts',
62 - output: 'dist/index.d.ts',
63 - }).generate();
64 - }
65 -}
66 -
67 -main();
compiler/packages/react-compiler-runtime/tsup.config.ts
+1 -1
@@ -9,7 +9,7 @@ export default defineConfig({
9 dts: false,
10 bundle: true,
11 format: 'cjs',
12 - platform: 'browser',
12 + platform: 'node',
13 target: 'es2015',
14 banner: {
15 js: `/**