Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86e62a3

Browse files
committed
Core: Tweak factory exports details
After this commit:1. Node.js always gets the CommonJS version2. Bundlers always get the ESM version3. Other tools take the ESM version when using `import` and the CommonJS when using `require`.The complexity is lower than for the `.` & `./slim` entry points because there'sno default export to handle so node/bundler wrapper files are not necessary.
1 parentc94ff35 commit86e62a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@
3131
},
3232
"./factory": {
3333
"node":"./dist/jquery.factory.js",
34-
"default":"./dist-module/jquery.factory.module.js"
34+
"module":"./dist-module/jquery.factory.module.js",
35+
"import":"./dist-module/jquery.factory.module.js",
36+
"default":"./dist/jquery.factory.js"
3537
},
3638
"./factory-slim": {
3739
"node":"./dist/jquery.factory.slim.js",
38-
"default":"./dist-module/jquery.factory.slim.module.js"
40+
"module":"./dist-module/jquery.factory.slim.module.js",
41+
"import":"./dist-module/jquery.factory.slim.module.js",
42+
"default":"./dist/jquery.factory.slim.js"
3943
},
4044
"./src/*.js":"./src/*.js"
4145
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp