File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
5
5
6
6
## Unreleased
7
7
8
+ ### Added
9
+ - use "module" in the same spot as "jsnext: main " ([ #2166 ] , thanks [ @MustafaHaddara ] )
10
+
8
11
## v0.3.4 - 2020-06-16
9
12
### Added
10
13
- add ` .node ` extension ([ #1663 ] )
@@ -48,6 +51,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
48
51
### Fixed
49
52
- find files with ` .json ` extensions (#333 , thanks for noticing @jfmengels )
50
53
54
+ [ #2166 ] : https://github.com/benmosher/eslint-plugin-import/pull/2166
51
55
[ #438 ] : https://github.com/benmosher/eslint-plugin-import/pull/438
52
56
53
57
[ #1663 ] : https://github.com/benmosher/eslint-plugin-import/issues/1663
@@ -61,3 +65,4 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
61
65
[ @SkeLLLa ] : https://github.com/SkeLLLa
62
66
[ @ljharb ] : https://github.com/ljharb
63
67
[ @opichals ] : https://github.com/opichals
68
+ [ @MustafaHaddara ] : https://github.com/MustafaHaddara
Original file line number Diff line number Diff line change @@ -42,8 +42,10 @@ function opts(file, config) {
42
42
}
43
43
44
44
function packageFilter ( pkg ) {
45
- if ( pkg [ 'jsnext:main' ] ) {
46
- pkg [ 'main' ] = pkg [ 'jsnext:main' ] ;
45
+ if ( pkg . module ) {
46
+ pkg . main = pkg . module ;
47
+ } else if ( pkg [ 'jsnext:main' ] ) {
48
+ pkg . main = pkg [ 'jsnext:main' ] ;
47
49
}
48
50
return pkg ;
49
51
}
You can’t perform that action at this time.
0 commit comments