Skip to content

Commit

Permalink
Switch to .mjs files for ESM (phoenixframework#4670)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris McCord <[email protected]>
  • Loading branch information
mveytsman and chrismccord authored Apr 13, 2022
1 parent 443a0a7 commit 990172b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if Mix.env() == :dev do

config :esbuild,
version: "0.14.29",
module: esbuild.(~w(--format=esm --sourcemap --outfile=../priv/static/phoenix.esm.js)),
module: esbuild.(~w(--format=esm --sourcemap --outfile=../priv/static/phoenix.mjs)),
main: esbuild.(~w(--format=cjs --sourcemap --outfile=../priv/static/phoenix.cjs.js)),
cdn:
esbuild.(
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"version": "1.6.4",
"description": "The official JavaScript client for the Phoenix web framework.",
"license": "MIT",
"module": "./priv/static/phoenix.esm.js",
"module": "./priv/static/phoenix.mjs",
"main": "./priv/static/phoenix.cjs.js",
"unpkg": "./priv/static/phoenix.min.js",
"jsdelivr": "./priv/static/phoenix.min.js",
"exports": {
"import": "./priv/static/phoenix.esm.js",
"import": "./priv/static/phoenix.mjs",
"require": "./priv/static/phoenix.cjs.js"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion priv/static/phoenix.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion priv/static/phoenix.esm.js → priv/static/phoenix.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1073,4 +1073,4 @@ export {
serializer_default as Serializer,
Socket
};
//# sourceMappingURL=phoenix.esm.js.map
//# sourceMappingURL=phoenix.mjs.map

Large diffs are not rendered by default.

0 comments on commit 990172b

Please sign in to comment.