我試圖用jspm設置一個項目。我有如下this偉大的教程和它的作品非常好,除了當我嘗試捆綁捆綁(jspm)React/jsx應用時出現ES6錯誤
$> jspm bundle-sfx app.jsx! app.js --skip-source-maps --minify
Building the single-file sfx bundle for app.jsx!...
err MultipleErrors: cartItem.jsx:5:22: Unexpected token =
cartItem.jsx:6:21: Unexpected token .
cartItem.jsx:6:22: Unexpected token PropTypes
cartItem.jsx:6:31: Unexpected token .
cartItem.jsx:7:14: Semi-colon expected
cartItem.jsx:7:14: Unexpected token :
(app.jsx,cartItem.jsx和github project)
我得到的印象是捆綁工具不理解es6,對嗎?
任何建議我在做什麼錯在這裏?
另外,!
的意思是跟隨文件名app.jsx
的含義?
這篇文章的作者在這裏:)謝謝! '!'表示加載的文件不是JavaScript文件,而是其他內容(在這種情況下爲JSX)。這是JSPM本身所強制的。 –
偉大的職位,非常感謝! –