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

UMD build / Class constructors cannot be invoked without 'new' #41

Closed
a-laughlin opened this issue Sep 13, 2016 · 3 comments
Closed

UMD build / Class constructors cannot be invoked without 'new' #41

a-laughlin opened this issue Sep 13, 2016 · 3 comments

Comments

@a-laughlin
Copy link

a-laughlin commented Sep 13, 2016

Appreciate the redux-orm concept. Tried testing it out with Redux and React served in a local html file for simplicity, and <script src="node_modules/redux-orm/lib/index.js"> leaves chrome choking on exports. Any chance you can configure Webpack to also output as UMD when publishing? A UMD build would also be really handy to share examples in jsbin/jsfiddle/codepen/etc.

@a-laughlin
Copy link
Author

Attempting to use redux-orm in node without webpack. Tried installing and configuring webpack to export a UMD build. Hit this error. Not sure I got the configs right. FWIW, generating a UMD build using correct webpack/babel configs could reduce the need to troubleshoot others' transpiling issues.

@a-laughlin
Copy link
Author

In node6/electron, I repeatedly got the error "Class constructors cannot be invoked without 'new'" when using <ModelName>.create({}). Turns out that the current babel config doesn't work for all environments, so a UMD build still breaks. Figured out a correct config. Small additions to package.json. Will submit a PR for reference.

@a-laughlin a-laughlin changed the title UMD build? UMD build / Class constructors cannot be invoked without 'new' Sep 18, 2016
@tommikaikkonen
Copy link
Collaborator

UMD build is added in 0.8.4.

@plandem plandem closed this as completed May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants