Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will make importing the es module a little nicer: import Waypoint from 'react-waypoint/es'; instead of import Waypoint from 'react-waypoint/build/index.mjs'; Thanks to @jmeas for the suggestion.
- Loading branch information
Showing
5 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
build | ||
es | ||
cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
build | ||
es | ||
cjs | ||
node_modules | ||
npm-debug.log | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ export default [ | |
], | ||
output: [ | ||
{ file: pkg.main, format: 'cjs' }, | ||
{ file: 'build/index.mjs', format: 'es' } | ||
{ file: 'es/index.mjs', format: 'es' } | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
trotzig
Author
Collaborator
|
||
], | ||
plugins: [ | ||
babel({ | ||
|
Do we know if earlier versions of Node will support
import Waypoint from 'react-waypoint/es;
when the index file is.mjs
? Because the.mjs
file extension is still pretty new, and largely unsupported, we might still need to document this asimport Waypoint from 'react-waypoint/es/index.mjs
.In other words, I'm not sure if this change makes the import any less ugly