olahol / reactpack

:package: build your react apps with one command and one `npm i`.
982 stars 36 forks source link

dev build of react build issue #17

Closed kmelve closed 8 years ago

kmelve commented 8 years ago

Thanks for the great work!

Tested this for a prototype at work and it has been pretty rad so far. One thing though, when I run the build (with the -O flag) I still get these error warnings:

It looks like you're using a minified copy of the development build of React Failed to parse SourceMap: http://localhost:1234/bundle.js.map <= seem to be a valid map-file though

olahol commented 8 years ago

Thank you @kmelve, not setting NODE_ENV to production was definitely an oversight. Correct behavior in version 0.5.1.

erikhuisman commented 8 years ago

The DefinePlugin will be overridden by .env.js file a user might use.

Maybe i should echo a warning + instruction when using both .env.js file and optimise together without defining NODE.ENV.

Alternatively i could just merge it in

olahol commented 8 years ago

Are you sure multiple DefinePlugin's overwrite each other? When testing on my machine I both get the NODE_ENV and the .env.js environment.

erikhuisman commented 8 years ago

No i am not sure... My bad..

olahol commented 8 years ago

No problem, always good to have an extra pair of eyes.