Skip to content

Output dist doesn't work in AMD environments because of browserify-shim #8

Open
@pixeldrew

Description

@pixeldrew

browserify-shim incorrectly rewrites require('react') to (window.React).

in a new version of browserify-shim, it rewrites to this (which is still broken):

var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null);

This might not be a bug but by the design of browserify-shim. It should be mentioned in your docs that the output of react-components-gulp-tasks will not be A/UMD compatible.

I was able to successfully make a UMD build using webpack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions