Skip to content

import order not respected for imported vs re-exported modules (T7440) #4356

Closed

Description

@babel-bot

Issue originally made by @loganfsmyth

Input code

import 'foo';
export {foo} from 'bar';

Description

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.foo = undefined;

var _bar = require('bar');

Object.defineProperty(exports, 'foo', {
  enumerable: true,
  get: function get() {
    return _bar.foo;
  }
});

require('foo');

Note that foo loads after bar.

Activity

  1. lenovouser commented on Mar 12, 2017

    @lenovouser

    Any updates?

  2. loganfsmyth commented on Mar 12, 2017

    @loganfsmyth
    Member

    This will likely be fixed as part of the 7.x released, eventually.

  3. added this to the Babel 7 milestone on Mar 17, 2017
  4. hulkish commented on May 4, 2017

    @hulkish
    Contributor

    @loganfsmyth this is when you're using babel-plugin-transform-export-extensionsright? I wonder if this is just a result of this plugin being applied before babel-plugin-transform-es2015-modules-*? Could the order be a problem here?

  5. added
    outdated
    on May 4, 2018
  6. locked as resolved and limited conversation to collaborators on May 4, 2018
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

    area: modulesoutdated

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions