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

Add transforms for legacy IE https://github.com/Rezonans/redux-async-… #64

Open
wants to merge 2 commits into
base: v1
Choose a base branch
from

Conversation

badtant
Copy link

@badtant badtant commented Mar 14, 2016

Lib failed in IE10 and these babel plugins were needed.

@@ -1,3 +1,7 @@
{
"presets": ["es2015", "react", "stage-0"],
"plugins": [
["transform-class-properties"],
["transform-es2015-classes", {loose: true}]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resolved the issue for me, but "loose" should be wrapped in double quotes.

@pmark
Copy link

pmark commented Mar 17, 2016

Looking forward to this being released ;)

@badtant
Copy link
Author

badtant commented Mar 18, 2016

Me too, seems like development on v1 has stopped :(

@ratson
Copy link

ratson commented Mar 30, 2016

@sars Is what @badtant said is true?

@Iuriy-Budnikov
Copy link

When will be release?

@dawidvdh
Copy link

Really need this fix for a production project.

@Iuriy-Budnikov
Copy link

@sars

@pmark
Copy link

pmark commented Apr 15, 2016

Just pull all the code into your project until it's released.

On Friday, April 15, 2016, Dawid van der Hoven [email protected]
wrote:

Really need this fix for a production project.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#64 (comment)

@Iuriy-Budnikov
Copy link

Pulled. It doesn't work :)

@pmark
Copy link

pmark commented Apr 15, 2016

This works for me:

  1. Clone the repo
  2. Build it (npm run build)
  3. Copy lib/ into my project as a subfolder named redux-async-connect
  4. Import redux-async-connect with a relative path

Works in IE9+ and other real browsers.

@Iuriy-Budnikov
Copy link

Iuriy-Budnikov commented Apr 15, 2016

screen shot 2016-04-15 at 8 14 27 pm

Yeah, I made monkey patching. But got an error.

@Iuriy-Budnikov
Copy link

screen shot 2016-04-15 at 8 13 29 pm

@pmark
Copy link

pmark commented Apr 15, 2016

Can you confirm that you ran "npm run build" from the redux-async-connect folder itself? Running your project's build script will not honor the .babelrc file in the redux-async-connect folder.

@Iuriy-Budnikov
Copy link

Can you confirm that you ran "npm run build" from the redux-async-connect folder itself? Running your project's build script will not honor the .babelrc file in the redux-async-connect folder.

Sure :)

@Iuriy-Budnikov
Copy link

I did npm run build in new folder redux-async-connect

@pmark
Copy link

pmark commented Apr 15, 2016

OK now I see what's going on:

  • The proto error will appear when using hot module reload (for development only) in IE because of how react-proxy is implemented.
  • Try testing IE in with the production environment, which is what ultimately matters.
  • Forget what I said about building redux-async-connect separately from your project. You can add the transform-class-properties and transform-es2015-classes plugins to your main project's .babelrc file.

@Iuriy-Budnikov
Copy link

Here my config

{
  "presets": ["react", "es2015", "stage-0"],

  "plugins": [
    "transform-runtime",
    "add-module-exports",
    "transform-decorators-legacy",
    "transform-react-display-name",
    "transform-class-properties",
    "transform-es2015-classes"
  ],

  "env": {
    "development": {
      "plugins": [
        "typecheck",
        ["react-transform", {
            "transforms": [{
                "transform": "react-transform-catch-errors",
                "imports": ["react", "redbox-react"]
              }
            ]
        }]
      ]
    }
  }
}

I tested with production. The same error.

@Iuriy-Budnikov
Copy link

with ["transform-es2015-classes", {"loose": true}] the same.

@pmark
Copy link

pmark commented Apr 15, 2016

Do you think that something else is using react-proxy?

@pmark
Copy link

pmark commented Apr 15, 2016

Did you start with react-redux-universal-hot-example?

@Iuriy-Budnikov
Copy link

Iuriy-Budnikov commented Apr 15, 2016

Did you start with react-redux-universal-hot-example?

Exactly.

@pmark
Copy link

pmark commented Apr 15, 2016

I wish I could help more, but I can confirm that the problem was resolved for me when I added those transforms and tested IE without HMR.

@Iuriy-Budnikov
Copy link

@pmark thanks, for your help. Could you check the same with react-redux-universal-hot-example?

@Iuriy-Budnikov
Copy link

I can share my repo

@hanzhao
Copy link

hanzhao commented Apr 29, 2016

I really need this PR for a project, too. 😢

@dtuyenle
Copy link

dtuyenle commented Jul 7, 2016

:_( Is this pushed to the latest release ? I really need this for prod

@snowcxt
Copy link

snowcxt commented Aug 29, 2016

need this for prod too

@hanzhao
Copy link

hanzhao commented Aug 30, 2016

@snowcxt Hi. I switch to makeomatic/redux-connect now to make my code work for prod. Maybe it helps.

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

Successfully merging this pull request may close these issues.

8 participants