You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI: fixing the import issue with Jest breaks using class properties shorthand and breaks dev build. Get the following in Terminal when running npm run start script:
The text was updated successfully, but these errors were encountered:
interglobalmedia
changed the title
Fixing import issue with Jest breaks using class properties in React 16.6.3
Fixing import issue with Jest 23.6 breaks using class properties in React 16.6.3
Dec 2, 2018
Not really quit sure if this is a bug or not, but it is not working as expected. This is not terrible since class properties have not even been approved yet, but still interested to know why it throws an error even though I have installed the Babel plugin @babel/plugin-proposal-class-properties and have it in .babelrc as well.
I figured out the solution to this problem last night and wrote an article about it entitled The New Babel 7 Config. For anyone interested in adding images to their projects, I also wrote an article about importing images in this second edition of the workflow entitled Importing Images in React 2.0: Jest (and Babel 7) and one on the "side effects" that resulted from such changes entitled The Jest Side Effect.
I am re-opening this issue (even though it has been resolved) so people visiting the repository will be made aware of it and the associated posts describing the process and eventual solution.
FYI: fixing the import issue with Jest breaks using class properties shorthand and breaks dev build. Get the following in Terminal when running
npm run start
script:ERROR in ./src/App.js
/Users/mariacam/Development/text-to-speech-app/src/App.js
2:18 error Parse errors in imported module './components/text/Text': Unexpected token = (6:11) import/namespace
2:18 error Parse errors in imported module './components/text/Text': Unexpected token = (6:11) import/default
2:18 warning Parse errors in imported module './components/text/Text': Unexpected token = (6:11) import/no-named-as-default
2:18 warning Parse errors in imported module './components/text/Text': Unexpected token = (6:11) import/no-named-as-default-member
✖ 4 problems (2 errors, 2 warnings)
The text was updated successfully, but these errors were encountered: