babel-plugin-dynamic-import-node icon indicating copy to clipboard operation
babel-plugin-dynamic-import-node copied to clipboard

Updated to babel 7

Open vikr01 opened this issue 6 years ago • 10 comments

This requires airbnb/babel-preset-airbnb#37 to work.

  • Updated all babel dependencies
  • Fixed all test cases
  • Removed testing for babel-preset-es2015 since it's been deprecated in favor or @babel/preset-env

vikr01 avatar Sep 09 '18 02:09 vikr01

You might need to make a PR for babel-plugin-add-module-exports as well, since it is a devDependency, and also seems to use Babel 6 ref: 59naga/babel-plugin-add-module-exports#65.

wolfy1339 avatar Sep 09 '18 05:09 wolfy1339

Will close #56

wolfy1339 avatar Sep 09 '18 05:09 wolfy1339

You might need to make a PR for babel-plugin-add-module-exports as well, since it is a devDependency, and also seems to use Babel 6

babel-plugin-add-module-exports is actually not good to use. Import statements will now use .default if it exists. See https://babeljs.io/docs/en/v7-migration-api#export-changes.

I forgot to remove it from the dependencies, but I did remove it from .babelrc.

vikr01 avatar Sep 09 '18 06:09 vikr01

@ljharb Now that airbnb/babel-preset-airbnb#37 has been merged, is this ready too?

Coder-256 avatar Oct 08 '18 22:10 Coder-256

They haven't released the changes to npm quite yet.

wolfy1339 avatar Oct 08 '18 22:10 wolfy1339

I'll update this PR now.

ljharb avatar Oct 08 '18 22:10 ljharb

@vikr01 i'm going to re-add add-module-exports, since .default should still never be exposed to require.

ljharb avatar Oct 08 '18 22:10 ljharb

@ljharb Sure that’s fine. Just to note though, babel’s plugins now expose .default when using require.

vikr01 avatar Oct 08 '18 22:10 vikr01

Sure, but just because they're doing the wrong thing doesn't mean we should :-)

ljharb avatar Oct 08 '18 23:10 ljharb

v2.2.0 is released, containing this commit which allows it to work on both babel 6 and 7.

I'm going to keep this PR and update it to become v3, which explicitly will only support babel 7.

ljharb avatar Oct 08 '18 23:10 ljharb