Skip to content
This repository has been archived by the owner on Feb 28, 2018. It is now read-only.

Node should use compiled version #30

Open
sedenardi opened this issue Nov 30, 2015 · 4 comments
Open

Node should use compiled version #30

sedenardi opened this issue Nov 30, 2015 · 4 comments

Comments

@sedenardi
Copy link

When I load this to be rendered server-side in node I get:

node_modules/react-ux-password-field/src/index.js:229
      infoBar = <div className="passwordField__info" style={this.infoStyle}>
                ^
SyntaxError: Unexpected token <

This is because I have babel setup to only transpile .jsx files. The issue is solved if I change package.json to point to the compiled ./lib/react-ux-password-field.js instead.

@sedenardi
Copy link
Author

Actually seems there are quite a lot of issues preventing this from being rendered server-side, including the use of componentWillMount() instead of componentDidMount() and references to navigator in render().

@seethroughdev
Copy link
Owner

Yeah, that makes perfect sense. This component was mostly an experiment, and didn't take server-side rendering into account.

If you'd like to submit a PR, I'd be happy to merge it in.

Thanks.

@tsironis
Copy link

tsironis commented Feb 9, 2016

👍 for this one. Any updates available?

@seethroughdev
Copy link
Owner

@tsironis can you confirm what your issue is here? is it "main" pointing to the src file?

@zealoushacker zealoushacker mentioned this issue Oct 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants