Skip to content

Commit 316d274

Browse files
committed
snapshot changes
1 parent b5d9109 commit 316d274

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

jscomp/bsb/bsb_templates.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ let root = OCamlRes.Res.([
610610
```\n\
611611
\n\
612612
This will replace the development artifact `build/Index.js` for an optimized version.\n\
613+
\n\
614+
**To enable dead code elimination**, change `bsconfig.json`'s `package-specs` `module` from `\"commonjs\"` to `\"es6\"`. Then re-run the above 2 commands. This will allow Webpack to remove unused code.\n\
613615
") ;
614616
File ("package.json",
615617
"{\n\
@@ -655,7 +657,7 @@ let root = OCamlRes.Res.([
655657
\ \"subdirs\" : true\n\
656658
\ },\n\
657659
\ \"package-specs\": [{\n\
658-
\ \"module\": \"es6\",\n\
660+
\ \"module\": \"commonjs\",\n\
659661
\ \"in-source\": true\n\
660662
\ }],\n\
661663
\ \"suffix\": \".bs.js\",\n\

lib/bsb.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13539,6 +13539,8 @@ let root = OCamlRes.Res.([
1353913539
```\n\
1354013540
\n\
1354113541
This will replace the development artifact `build/Index.js` for an optimized version.\n\
13542+
\n\
13543+
**To enable dead code elimination**, change `bsconfig.json`'s `package-specs` `module` from `\"commonjs\"` to `\"es6\"`. Then re-run the above 2 commands. This will allow Webpack to remove unused code.\n\
1354213544
") ;
1354313545
File ("package.json",
1354413546
"{\n\
@@ -13584,7 +13586,7 @@ let root = OCamlRes.Res.([
1358413586
\ \"subdirs\" : true\n\
1358513587
\ },\n\
1358613588
\ \"package-specs\": [{\n\
13587-
\ \"module\": \"es6\",\n\
13589+
\ \"module\": \"commonjs\",\n\
1358813590
\ \"in-source\": true\n\
1358913591
\ }],\n\
1359013592
\ \"suffix\": \".bs.js\",\n\

lib/whole_compiler.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32252,8 +32252,8 @@ and check_value_name name loc =
3225232252
(* Note: we could also check here general validity of the
3225332253
identifier, to protect against bad identifiers forged by -pp or
3225432254
-ppx preprocessors. *)
32255-
32256-
if String.length name > 0 && (name.[0] = '#') then
32255+
if !Clflags.bs_only && name = "|." then raise (Error(Illegal_value_name(loc, name)))
32256+
else if String.length name > 0 && (name.[0] = '#') then
3225732257
for i = 1 to String.length name - 1 do
3225832258
if name.[i] = '#' then
3225932259
raise (Error(Illegal_value_name(loc, name)))

0 commit comments

Comments
 (0)