Dev-only files in the project


#1

Is there a way to make some files be included in dev bundle but not in production bundle?
You see, I have some files that I use for manual testing, eg: I test adding posts; I have a dev-only (displayed only in development) button ‘fill data’ which fills my post form and many many of its fields with some test data; then I can submit that post and check that everything works as intended.
The code that fills the post with data can grow rather large (there are many field combinations for each post type) and I wouldnt want to ship it to production. How can that be done?


#3

You could consider extracting this functionality out into a separate package, then marking it as debugOnly. This will keep the code from being bundled into your production build.