elixir - Different vendor file for production and development -


i'm using phoenix 0.14.0 , i'm planning use reactjs create user interface.

the way i'm doing putting react.min.js in web/static/vendor folder. thing is, want in development non-minified version of react used instead, since has debugging code.

when use react.min.js final size of minified app.js ~150k, , if use react.js final size 550k, don't think negligible difference.

is there way can use different static file production , development in phoenix?

you can either put regular react.js in project , let plugin uglify-js-brunch minify on production builds, or can put both files there , use overrides in brunch config include/exclude want depending on environment. latter might this:

conventions:   ignored: [     /[\\/]_/,     'web/static/vendor/react.min.js'   ] overrides:   production:     conventions:       ignored: [         /[\\/]_/,         'web/static/vendor/react.js'       ] 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -