Skip to content
This repository was archived by the owner on May 11, 2018. It is now read-only.
This repository was archived by the owner on May 11, 2018. It is now read-only.

Import instead of require for es6.promise  #433

@sheerun

Description

@sheerun

I use both babel and babel-preset-env beta.2.

My .babelrc:

{
  "presets": [
    ["env", {
      "target": {
        "node": "4"
      },
      "useBuiltIns": "usage",
      "debug": true
    }]
  ]
}

Resulting start of compiled .js file:

#!/usr/bin/env node
"use strict";

import "babel-polyfill/lib/core-js/modules/es6.promise";

require("babel-polyfill/lib/core-js/modules/es6.symbol");

require("babel-polyfill/lib/core-js/modules/web.dom.iterable");

require("babel-polyfill/lib/regenerator-runtime/runtime");

require("babel-polyfill/lib/core-js/modules/es6.string.starts-with");

I suspect this might be because regenerator-runtime is added? But really, I have no idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions