Create-react-app: Question: Can I make non-minified build?

Created on 3 Nov 2017  路  16Comments  路  Source: facebook/create-react-app

question

Most helpful comment

It would be nice.

I'm currently facing a bug that is only reproducible in the production version of the code. Minified code is horrible to debug.

All 16 comments

It's not supported. Development builds you get with npm start are in development mode and not minified, but they're not actually written to the disk. Production bundles are always minified.

What do you need it for?

but don't like the "html in one line"

I don't understand why this is important to you. No, it's not supported.

If I may, I have an error on my build: when I do on my iPhone "Add to Home Screen", I have this error "SyntaxError: Unexpected token ':'. Parse error.". For debugging, I open the dev tools in Safari, but I can't find a way to prettify my JS code, so I am unable to debug my code and find where the unexpected token is.
That's a case where having the production code not minified would be useful, wouldn't it ?

I have the same issue with electron, my build works in local but not inside electron, I can't debug the minified file !

An additional use case for this is when debugging end-2-end tests - we run them against a qa deployment, and get a nice video of what happens, but is very difficult to debug when the error in the console is e is not a function. We can sometimes re-run our tests locally against a local build, but there are some bugs, especially related to timing and race conditions, that only happen on the remote machine.

It would be nice.

I'm currently facing a bug that is only reproducible in the production version of the code. Minified code is horrible to debug.

I am using create-react-app with Cordova. Every time I make a change for debugging I need to rebuild, which may take half an minute. It would be nice to have the production build not minified so that I can debug on the production build.

there are cases than minify failes if npm module doesn't support ES5.

A specific example of the issue that @lebed2045 described:
https://github.com/brightcove/react-player-loader/issues/8

I'm running code through a 3rd party service that hosts the code and only gives the APIs access from within their own environment. I cannot run the code locally because all of what my code does is based on the APIs inside their service.

This project and a lot of others from Facebook seem to keep removing common, useful features with the idea that they are keeping the rest of us from shooting ourselves in the foot. Makes using their software painful. I don't get why there is an objection to adding this functionality when anyone else would find this a very reasonable request.

what solution is there for when one needs to integrate a product created with "create-react-app" into a different build and minifying system?

edit:
i use the following for removing hashes from build/ files:
https://github.com/facebook/create-react-app/issues/1005#issuecomment-258334990

but don't like the "html in one line"

I don't understand why this is important to you. No, it's not supported.

This is important to me because it also seems to minify the contents a <pre> tag, which kind of defeats it's purpose. Unless there is something I'm missing...

Has a decision been taken ? If yes, can someone please update this thread ? If no, then can this be added to the priority list please ?

Thanks

The issue has been closed because it won鈥檛 be supported. What needs to be updated about it?

Sorry , I was thinking that this would be reopened because there are requests that warrant a second look. This is what my premise was.

+1 - I am using create-react-app in a QWebEngineView
To debug locally you have to run a remote debug session and hook chrome's dev tools to the page that way.

The time it takes to pretty print and apply the symbol maps to the minified source causes the remote debug session to timeout, basically making it impossible to step through the source.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fson picture fson  路  3Comments

jnachtigall picture jnachtigall  路  3Comments

adrice727 picture adrice727  路  3Comments

onelson picture onelson  路  3Comments

alleroux picture alleroux  路  3Comments