Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix browser module resolution #614

Merged
merged 1 commit into from Apr 1, 2020
Merged

Commits on Aug 21, 2019

  1. Fix browser module resolution

    When webpack/rollup or another bundler, implementing the
    [`browser-resolve`](https://www.npmjs.com/package/browser-resolve)
    spec tries to resolve `jszip` for a browser-based project they fail
    with:
    
    ```
    ERROR in ./node_modules/jszip/lib/readable-stream-browser.js
    Module not found: Error: Can't resolve 'stream' in '/node_modules/jszip/lib'
    ```
    
    Since you already produce a browser build, we just need to point to
    it inside of `package.json`'s `browser` field.
    
    PS: You'd probably want to double check the semantics of `"."`.
    
    Looking at `browser-resolve` it seems that everything will work
    as expected. Also, trying empirically with webpack, everything worked
    out, but few more pairs of eyes would be greatly appreciated.
    
    Also @sokra should be able to share a valuable opinion.
    
    Fix Stuk#524
    Fix Stuk#521
    Fix Stuk#477
    mgechev committed Aug 21, 2019
    Copy the full SHA
    617e3ce View commit details
    Browse the repository at this point in the history