bluewings / pug-as-jsx-loader

MIT License
188 stars 15 forks source link

codemod.js has some bugs #23

Closed Kevin-coder80 closed 5 years ago

Kevin-coder80 commented 6 years ago

hi, when i run this loader, the terminal display error message:

Module build failed: /Users/xxx/works/React/react-pug/my_app/node_modules/pug-as-jsx-loader/lib/codemod.js:203 ) ^ SyntaxError: Unexpected token )

i find the codemod.js has many extra commas, when i clear there commas then webpack run successful.

bluewings commented 6 years ago

@seedliu It looks like you are using node 7 or lower. I noticed that trailing-commas-in-function-syntax is not supported in that version. How about using the latest version of the node (currently 11) or 8 or more?

I will fix the bug you mentioned soon, but it will take some time to publish.

Kevin-coder80 commented 6 years ago

@bluewings i use the node 8, it's worked. thx!

bluewings commented 5 years ago

fixed.