Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#### :boom: Breaking Change

- Output format is `esmoule` by default. https://github.com/rescript-lang/rescript/pull/8128

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Output format is `esmoule` by default. https://github.com/rescript-lang/rescript/pull/8128
- Output format is `esmodule` by default. https://github.com/rescript-lang/rescript/pull/8128


#### :eyeglasses: Spec Compliance

#### :rocket: New Feature
Expand Down
3 changes: 1 addition & 2 deletions compiler/bsb/bsb_package_specs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ let package_flag_of_package_specs (package_specs : t) ~(dirname : string) :
| Some x -> Ext_string.inter3 res "-runtime" x

let default_package_specs suffix =
(* TODO: swap default to Esmodule in v12 *)
Spec_set.singleton {format = Commonjs; in_source = false; suffix}
Spec_set.singleton {format = Esmodule; in_source = false; suffix}

(**
[get_list_of_output_js specs "src/hi/hello"]
Expand Down
4 changes: 3 additions & 1 deletion rewatch/CompilerConfigurationSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ Currently supported features:

### Module-Format

enum: "commonjs" | "es6" | "es6-global"
enum: "commonjs" | "es6" | "es6-global" (deprecated)

default: "es6"

### Suffix

Expand Down
2 changes: 1 addition & 1 deletion rewatch/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ impl Config {
pub fn get_package_specs(&self) -> Vec<PackageSpec> {
match self.package_specs.clone() {
None => vec![PackageSpec {
module: "commonjs".to_string(),
module: "es6".to_string(),
in_source: true,
suffix: Some(".js".to_string()),
}],
Expand Down
Loading