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

ES6 not supported by uglify #1

Closed
karl-run opened this issue Jun 14, 2017 · 3 comments
Closed

ES6 not supported by uglify #1

karl-run opened this issue Jun 14, 2017 · 3 comments
Labels

Comments

@karl-run
Copy link

I'm using create-react-app which uses uglify for the production build.

Issue as described here: facebook/create-react-app#984

Not sure if this issue is relevant for this library, feel free to close it if you do not think it applies.

@kunokdev
Copy link
Owner

Yes it's related to this package, I will fix this asap and update package

@kunokdev
Copy link
Owner

kunokdev commented Jun 14, 2017

Hi @HermitH I made update. I am now using component generator build for this package and I tested it with Next.js build and it worked, I also successfully built create-react-app sample, even tho I haven't tested deployment part but I think it should work properly now.

Here is modified create-react-app sample code with this package included.

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import WindowSizeListener from 'react-window-size-listener'

class App extends Component {

  constructor(){
    super()
    this.state = { windowWidth: null }
  }

  render() {
    return (
      <div className="App">
        <div className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h2>Welcome to React</h2>
          <WindowSizeListener
          onResize={(windowSize) => {
            this.setState({ windowWidth: windowSize.windowWidth })
          }} />
        </div>
        <p className="App-intro">
          Current width: { this.state.windowWidth }
        </p>
      </div>
    );
  }
}

export default App;

Reopen issue if there are any problems and I'll try to fix them asap.

@kunokdev kunokdev added the bug label Jun 14, 2017
@karl-run
Copy link
Author

Seems to work fine now. Thanks for the quick fix.

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

No branches or pull requests

2 participants