christianalfoni / webpack-express-boilerplate

A boilerplate for running a Webpack workflow in Node express
MIT License
1.4k stars 292 forks source link

using facebook flow in expressjs files #47

Closed cocodrino closed 8 years ago

cocodrino commented 8 years ago

Hi @christianalfoni , I've a pretty silly question...I'm still really noob with webpack...I'm trying to use facebook flow in my code (frontend and backend)..with my frontend works ok because the preset react includes support for facebook flow...

my problem is with the frontend, I've added "transform-flow-strip-types" to my module presets loaders but seems not works, I get an error in my express file with this code


var test : string = "it works"

because doesnt recognize the :

thanks christian, hope you can give me a better understand about it... thank you

christianalfoni commented 8 years ago

Hi there @cocodrino!

I am sorry to say that I have never worked with Flow before. But if you want to use Webpack with server files it can be a little bit tricky. You might want to check out Kotatsu (https://github.com/Yomguithereal/kotatsu) which allows you to use webpack for server code as well :)

Sorry to not be of any more help!

cocodrino commented 8 years ago

thanks @christianalfoni it works nicely...btw good job with cerebral, it's really cool

christianalfoni commented 8 years ago

Glad it is helpful to you! :-)