zoubin / browserify-postcss

transform contents using postcss
19 stars 10 forks source link

tranform breaks when first line of required css is a /* comment */ #4

Closed diffalot closed 3 years ago

diffalot commented 8 years ago

I'm trying to do browserify --transform [ browserify-postcss --inject --global ] --transform [ babelify --presets [ es2015 ] ] src | uglifyjs -c > dist/app.js

Where I require('leaflet/dist/leaflet.css') from one of my files in /src but i keep getting an error about Unterminated string constant (1:47)

Then I can get browserify to work by going into node_modules/leaflet/dist/leaflet.css and removing the first couple of lines (a /* comment */ and a blank line).

https://github.com/Leaflet/Leaflet/blob/master/dist/leaflet.css

zoubin commented 7 years ago

I have added a comment line in example/src/entry.css and it works fine on both Mac and Windows. Also, I have fixed some bugs in 0.3.3. You can try it.