Skip to content

Any support for ES6 modules?  #277

Open

Description

@SarasArya

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

Activity

  1. alexandre-works commented on Sep 4, 2017

    @alexandre-works
    Collaborator

    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

  2. SarasArya commented on Sep 4, 2017

    @SarasArya
    Author

    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',
      });
    });
    
  3. 01Kuzma commented on Feb 21, 2018

    @01Kuzma

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions