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

[4.6.1] Reactstrap dist minified builds broken #429

Closed
virgofx opened this issue May 15, 2017 · 9 comments
Closed

[4.6.1] Reactstrap dist minified builds broken #429

virgofx opened this issue May 15, 2017 · 9 comments

Comments

@virgofx
Copy link
Collaborator

virgofx commented May 15, 2017

The minified versions are broken in 4.6.1. Somehow the build does not produce proper UMD output with latest Rollup. See output:

Uncaught ReferenceError: process is not defined
    at invariant.js:26
    at index.js:330
    at index.js:330

invariant.js:26

if (process.env.NODE_ENV !== 'production') {
  validateFormat = function validateFormat(format) {
    if (format === undefined) {
      throw new Error('invariant requires an error message argument');
    }
  };
}
@eddywashere
Copy link
Member

Thanks for reporting! Sounds like this affects people that point to a cdn hosted version or point to minified file in build tooling.

Was this working in the previous release or has this been broken since rollup integration?

I'll leave this up for grabs, if you work on it please call it here or slack. Otherwise I'll look at it this evening. Thanks!

@virgofx
Copy link
Collaborator Author

virgofx commented May 15, 2017

Was working as of 4.5.0 with the addition of Rollup PR #386. Perhaps could be using development version of React/invariant now for dist builds.

@eddywashere Yes affects exactly those two cases. Testing external from CDN and when including via tooling into app from /node_modules/reactstrap/dist results in above outputs.

@eddywashere
Copy link
Member

Thanks! It's likely part of the roll up plugin changes I did. 8b379a4

Should be safe to revert or look at what broke between major versions.

@TheSharpieOne
Copy link
Member

https://github.com/reactstrap/reactstrap/blob/master/package.json#L5 should not be pointing to the dist, but the lib.

@virgofx
Copy link
Collaborator Author

virgofx commented May 15, 2017

@TheSharpieOne what about the other values that point to dist as well ... module jsnext:main ?

@th3fallen
Copy link

Should be fixed in #433

@TheSharpieOne
Copy link
Member

#433 will not fix the dist builds being development builds (for things like UMD, as mentioned here). It only fixes when importing from node_modules.

@TheSharpieOne
Copy link
Member

@vigrofx for es modules, the dist works. Extra components will be removed via tree shaking

@eddywashere
Copy link
Member

should be good now with 4.6.2. Upgrade notes: make sure all peer deps are installed with npm install --save reactstrap react-transition-group react react-dom.

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

No branches or pull requests

4 participants