Babel Error: Unexpected Token
ashishkumar-compro opened this issue · comments
Description
I am trying to use draft-js-inline-toolbar-plugin inside react-boilerplate-typescript and I am getting the following error:
I have tried to use the same library in react-boilerplate, and it's working fine.
Steps to reproduce
Steps to reproduce the behavior:
Clone the following repo:
Run the following commands:
- npm install
- npm start
Expected behavior
The Babel error should not come.
Versions
- React-Boilerplate: 4.1
- Node/NPM: 10.16.3 / 6.9.0
- Browser: Chrome Version 77.0.3865.90
Can you delete these lines in babel.config.js
file. I think unused babel typescript plugin is ruining something. It works with me. Can you verify that it works for you too ?
Hi,
Thanks! It is working now, Also I tried to enable the isTSX option in @babel/plugin-transform-typescript and its working then also.
[
'@babel/plugin-transform-typescript',
{
isTSX: true,
allowNamespaces: true,
},
],
Which option do you recommend, completely removing the plugin or enabling the isTSX option?
Well I suggest you delete it. Babel typescript plugin isnt used. ts-loader
does that work better in my opinion. So I kept that plugin as optional. Just remove it I'd say
ok thanx! 😄