59naga / babel-plugin-add-module-exports

【v0.2 no longer maintained】 Fix babel/babel#2212 - Follow the babel@5 behavior for babel@6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how does this plugin complements babel-node?

zhenyulin opened this issue · comments

I'm using this plugin mainly for writing webpack config with export default.

if I do import webpackConfig from '', it seems babel-node has helped handle the module, and I wouldn't need this plugin.

If I do require('./webpackConfig'), it is treated as an UMD, presumably babel-node doesn't transpile the export, so I need to use this plugin to enable it.

Is the understanding correct?