Skip to content
This repository has been archived by the owner on Sep 28, 2018. It is now read-only.

fix browserify build #70

Closed
wants to merge 6 commits into from

Conversation

calvinmetcalf
Copy link

this fixes #44 by doing 2 things

  1. making it so that encoding-indexes doesn't actually export anything (all it was exporting was global anyway) and conversely encodings doesn't do anything beside just import.
  2. adds a key to the package.json which prevents loading of encoding-indexes in browserify/webpack

@@ -11,8 +11,7 @@
// If we're in node require encoding-indexes and attach it to the global.
if (typeof module !== "undefined" && module.exports &&
!global["encoding-indexes"]) {
global["encoding-indexes"] =
require("./encoding-indexes.js")["encoding-indexes"];
require("./encoding-indexes.js");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directly conflicts with the change made for b4e5bc2 for #67

if (typeof module !== "undefined" && module.exports) {
module.exports = global;
}

global["encoding-indexes"] =
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea was that any export was unnecessary due to this

@inexorabletash
Copy link
Owner

@therufa - can you comment on this?

@calvinmetcalf
Copy link
Author

I just published my fork as text-encoding-polyfill

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove require of encoding-indexes.js
2 participants