Skip to content

Commit bb778cb

Browse files
committed
restore ESM build
1 parent 9973270 commit bb778cb

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* After updating code via Git, to prepare all examples:
1010
```sh
1111
cd react_on_rails/
12-
bundle && yarn && rake examples:gen_all && rake node_package && rake
12+
bundle && yarn && rake shakapacker_examples:gen_all && rake node_package && rake
1313
```
1414

1515
See [Dev Initial Setup](#dev-initial-setup) below for, well... initial setup,

node_package/src/ReactOnRails.full.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
import Client from './ReactOnRails.client';
1010

1111
if (typeof window !== 'undefined') {
12-
console.log('ReactOnRails: Optimization opportunity: "react-on-rails" includes server-rendering code. Browser may not need it. See https://forum.shakacode.com/t/how-to-use-different-versions-of-a-file-for-client-and-server-rendering/1352 (requires sign in)');
12+
console.log('ReactOnRails: Optimization opportunity: "react-on-rails" includes ~14KB of server-rendering code. Browser may not need it. See https://forum.shakacode.com/t/how-to-use-different-versions-of-a-file-for-client-and-server-rendering/1352 (requires sign in)');
1313
}
1414

1515
/**

package-scripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ scripts:
2525
# 3. Check if the project is built now;
2626
# 4. If it failed, print an error message (still follow https://docs.npmjs.com/cli/v8/using-npm/scripts#best-practices).
2727
script: >
28-
[ -f node_package/lib/ReactOnRails.js ] ||
28+
[ -f node_package/lib/ReactOnRails.full.js ] ||
2929
(npm run build >/dev/null 2>&1 || true) &&
30-
[ -f node_package/lib/ReactOnRails.js ] ||
30+
[ -f node_package/lib/ReactOnRails.full.js ] ||
3131
{ echo 'Building react-on-rails seems to have failed!'; }
3232
3333
format:

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"esModuleInterop": true,
55
"jsx": "react-jsx",
66
"lib": ["dom", "ESNext"],
7-
"module": "NodeNext",
7+
"module": "ESNext",
8+
"moduleResolution": "bundler",
89
"noImplicitAny": true,
910
"outDir": "node_package/lib",
1011
"strict": true,

0 commit comments

Comments
 (0)