Skip to content

Instantly share code, notes, and snippets.

@octatone
Created March 29, 2015 17:50
Show Gist options
  • Save octatone/fee10151c87f988f27ce to your computer and use it in GitHub Desktop.
Save octatone/fee10151c87f988f27ce to your computer and use it in GitHub Desktop.
external and require generating different hashes for react/addons, causing bundles to break

When my external build is built I end up with the hash nv2Kki for react/addons.

When my main bundle is built, it is referencing react/addons with the hash yutbdK.

This of course leads to an Uncaught Error: Cannot find module 'yutbdK' error emitted from my external.js bundle.

If I manually find and replace yutbdK in my main bundle with nv2Kki, then everything works.

Here is my gulpfile for building these two files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment