Pregunta

Browserify great and all, and makes it really sweet (even compared to require.js), but the idea of bundling everything into one minified file although sounds great for final version of the app, feels like something I would like to avoid during development. Wouldn't it make difficult to debug stuff?

Is it possible to use browserify and still keep all javascript files and make it more transparent for the browser during development? And when you ready to ship it run browserify bundler and minify everything into one file?

Or maybe there's better approach - like keeping all scripts listed in a partial that gets included to the main page for development or something like that?

Upd: I just found that there's an option:

--debug -d  Enable source maps that allow you to debug your files separately.

Is that helpful? I guess it is. But I suppose it still makes it difficult if want to use coffeescript source maps

¿Fue útil?

Solución

Indeed you shouldn't use minified/concatenated Javascript in development. Luckly there are a myriad of ways of solving this particular issue, I recommend taking a look into an automated build process like Grunt.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top