vendredi 17 février 2017

Unexpected token import Using React Jasmine Babel Webpack

Trying to write some Jasmine tests for my React App, and getting this error:

at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.jasmine.executeSpecsInFolder (C:\Users\alex.averkov\Documents\ReactVersionCheckerJasmineTest\node_modules\jasmine-node\lib\jasmine-node\index.js:160:9)
at Object.<anonymous> (C:\Users\alex.averkov\Documents\ReactVersionCheckerJasmineTest\node_modules\jasmine-node\lib\jasmine-node\cli.js:248:9)

Using React, Babel-loader, webpack. Only gives error if i try to import component, or if i use required('component') and in component i use Import.

Aucun commentaire:

Enregistrer un commentaire