Babel throws a type error when exporting aggregates

后端 未结 1 1996
离开以前
离开以前 2021-01-19 02:02

When running my gulp task, I get the following error:

SyntaxError in plugin \"gulp-babel\"
Message:
    /Users/******/Repos/******/src/scripts/config/index.j         


        
1条回答
  •  悲哀的现实
    2021-01-19 02:52

    From this thread

    The problem is that we added export * as ns from "foo" support by default to @babel/parser (in #10521) but not to @babel/preset-env.

    As a workaround, you can enable @babel/plugin-proposal-export-namespace-from in your config.

    So add @babel/plugin-proposal-export-namespace-from to your .babelrc and dev dependencies and you should be OK!

    It looks like eventually this will be built into the preset-env so you won't have to use a plugin.

    0 讨论(0)
提交回复
热议问题