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

Any support for ES6 modules? #277

Open
SarasArya opened this issue Aug 31, 2017 · 3 comments
Open

Any support for ES6 modules? #277

SarasArya opened this issue Aug 31, 2017 · 3 comments

Comments

@SarasArya
Copy link

I am trying to import outdatedbrowser in webpack. But I see there is no support.
any plans on supporting that?

@alexandre-works
Copy link
Collaborator

alexandre-works commented Sep 4, 2017

Hi there,
Due the fact that the JS used must be "very old" and "outdated" to be supported to older browsers, I would say that when you try to use webpack it may give you a bunch of errors... Thats is my feeling but tests need to be done.
This plugin is very specific, maybe a classical approach in the way you incorporate into your project is the best option.
Anyway, is a cool idea and is something that must be work on.
Cheers

@SarasArya
Copy link
Author

SarasArya commented Sep 4, 2017

Hey... I got it to work using something called exports-loader. This is how the code looks.

let outdatedBrowser = require("exports-loader?outdatedBrowser!outdatedbrowser/outdatedbrowser/outdatedbrowser.js")

addLoadEvent(function() {
  outdatedBrowser({
    bgColor: '#f25648',
    color: '#ffffff',
    lowerThan: 'transform',
    languagePath: 'node_modules/outdatedbrowser/outdatedbrowser/lang/en.html',
  });
});

@01Kuzma
Copy link

01Kuzma commented Feb 21, 2018

@SarasArya you put this in you index.js?

Could it be used without addLoadEvent(function() {} in React.js? In such way I get it working

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