Skip to content
This repository was archived by the owner on Jun 5, 2022. It is now read-only.

Include compiled file with npm package #29

Merged
merged 1 commit into from
May 22, 2018
Merged

Include compiled file with npm package #29

merged 1 commit into from
May 22, 2018

Conversation

JakeHartnell
Copy link
Owner

Ok, lot's of stuff here. Decided to switch to react-scripts for the demo app, cleaned up a lot of outdated dependencies, and now include a bundled .js file with the npm package which should solve a lot of outstanding issue.

It would be good to get a sanity check on this before merging. Any thoughts? I'm going to go ahead and publish v1.0.8 on npm so we can see if it resolves issues like #21.

@donalmurtagh
Copy link
Contributor

donalmurtagh commented May 18, 2018

I tried using version 1.0.8, but it seems to be completely broken. Even with the simplest possible usage

import React from "react";
import PropTypes from "prop-types";
import ImageUploader from 'react-images-upload';

export default class ImageFileWidget extends PureComponent {
  constructor(props) {
    super(props);
  }

  onChange = fileDataURLs => {
  };

  render() {
    return (
      <div>
        <ImageUploader
          withIcon
          onChange={this.onChange}/>
      </div>
    );
  }
}

I get this error when the component is loaded

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

https://cl.ly/1D0H1o0S0i3C

@JakeHartnell JakeHartnell changed the title v1.0.8 Include compiled file with npm package May 18, 2018
@JakeHartnell
Copy link
Owner Author

Ok, I actually tested v1.0.95 in a create-react-app project and it works fine now. This should resolve #85.

@donalmurtagh
Copy link
Contributor

I'll give the new version a try on Monday

…ean up old dependencies, included compiled js with npm package.
@donalmurtagh
Copy link
Contributor

donalmurtagh commented May 21, 2018

@JakeHartnell the packaging problems appear to be fixed in v1.0.95

@JakeHartnell JakeHartnell merged commit 57a1f1e into master May 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants