Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use spread syntax in babel 7 #112

Closed
chikara-chan opened this issue Dec 8, 2017 · 1 comment · Fixed by #125
Closed

Can't use spread syntax in babel 7 #112

chikara-chan opened this issue Dec 8, 2017 · 1 comment · Fixed by #125
Assignees

Comments

@chikara-chan
Copy link

code

{...{ props: { }, attrs: { } }}

report

Module build failed: Error: This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed  from that module, such as 'addNamed' or 'addDefault'.
    at File.addImport (/Users/chikara/Documents/next-admin/node_modules/@babel/core/lib/transformation/file/file.js:114:11)
    at PluginPass.addImport (/Users/chikara/Documents/next-admin/node_modules/@babel/core/lib/transformation/plugin-pass.js:34:22)
    at buildOpeningElementAttributes (/Users/chikara/Documents/next-admin/node_modules/babel-plugin-transform-vue-jsx/index.js:180:25)
    at buildElementCall (/Users/chikara/Documents/next-admin/node_modules/babel-plugin-transform-vue-jsx/index.js:114:17)
    at PluginPass.exit (/Users/chikara/Documents/next-admin/node_modules/babel-plugin-transform-vue-jsx/index.js:20:26)
    at newFn (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/visitors.js:223:21)
    at NodePath._call (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/path/context.js:64:19)
    at NodePath.call (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/path/context.js:38:17)
    at NodePath.visit (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/path/context.js:108:8)
    at TraversalContext.visitQueue (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/context.js:139:18)
    at TraversalContext.visitSingle (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/context.js:98:19)
    at TraversalContext.visit (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/context.js:180:19)
    at Function.traverse.node (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/index.js:76:17)
    at NodePath.visit (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/path/context.js:106:18)
    at TraversalContext.visitQueue (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/context.js:139:18)
    at TraversalContext.visitSingle (/Users/chikara/Documents/next-admin/node_modules/@babel/traverse/lib/context.js:98:19)

any plan to support it in future?

@wietseva
Copy link
Contributor

wietseva commented Feb 15, 2018

You can use my fork for now if you want to use babel 7

npm install\
  https://github.com/wietseva/babel-plugin-transform-vue-jsx.git#babel7\
  @babe/preset-env\
  @babel/helper-module-imports\
  babel-plugin-syntax-jsx\
  babel-helper-vue-jsx-merge-props\
  --save-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants