jlengstorf / learn-rollup

This is an example project to accompany a tutorial on using Rollup.
https://code.lengstorf.com/learn-rollup-js/
ISC License
191 stars 61 forks source link

Babel's "Unexpected token" error #45

Open alejandroiglesias opened 6 years ago

alejandroiglesias commented 6 years ago

Hi, I'm following the Rollup.js Tutorial, Part 2 (How to Bundle Stylesheets and Add LiveReload With Rollup), and after setting postcss, I get an Unexpected token error from the babel plugin. If I comment the import line for the CSS file, it goes away and everything goes back to green. Are you aware of this? Am I missing something?

alejandroiglesias commented 6 years ago

Nevermind, I found out. It seems the order in which you declare Rollup's plugins array is important. I was putting babel before postcss. It would be great if you made a note for that in the article, which by the way is great! Thanks.

jlengstorf commented 6 years ago

Good point — I'll add it to my todo list to put a note in there. Thanks!