-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use statically analyzable CJS exports
This enables named imports in node ESM scripts because they do some magic to detect which module is exported.
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 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,5 +1,7 @@ | ||
/* eslint-env node */ | ||
module.exports = | ||
process.env.NODE_ENV === 'production' | ||
? require('./umd/history.production.min.js') | ||
: require('./umd/history.development.js'); | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./umd/history.production.min.js'); | ||
} else { | ||
module.exports = require('./umd/history.development.js'); | ||
} |
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