Skip to content

Commit ea30e56

Browse files
committed
chore: use .mjs import
1 parent e22f2a4 commit ea30e56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"ssr"
1010
],
1111
"main": "./lib/index.js",
12-
"module": "./lib/es-relay-hooks.js",
12+
"module": "./lib/es-relay-hooks.mjs",
1313
"exports": {
14-
"import": "./lib/es-relay-hooks.js",
14+
"import": "./lib/es-relay-hooks.mjs",
1515
"require": "./lib/index.js"
1616
},
1717
"license": "MIT",

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function createConfigInternal({ format, production }) {
2424
return {
2525
input: 'src/index.ts',
2626
output: {
27-
file: 'lib/' + format + '-relay-hooks' + (production ? '.min' : '') + '.js',
27+
file: 'lib/' + format + '-relay-hooks' + (production ? '.min' : '') + (format === "es" ? ".mjs" : '.js'),
2828
format,
2929
name: 'relay-hooks',
3030
indent: false,

0 commit comments

Comments
 (0)