Closed joshuaellis closed 3 years ago
@joshuaellis if you got any quick workaround for that it would be welcome otherwise I'm seriously thinking of just removing the dev/prod condition and let the developer manage it.
I think having it remove from prod is a great idea. I think its useful to have a simpler override. Would this work?:
if (process.env.NODE_ENV === 'development' || process.env.R3F_PERF_SHOW_IN_PROD) {
module.exports = require('./r3f-perf.cjs.development.js')
} else {
module.exports = require('./r3f-perf.cjs.production.min.js')
}
That's taken from dist/index
That way in my env file i can set:
R3F_PERF_SHOW_IN_PROD=true
@joshuaellis v.0.79.0 released. It adds process.env.R3F_PERF_SHOW_IN_PROD.
Importing the component to show in production as shown in the readme poses a lot of difficulties in Typescript, would it be better perhaps to maybe be able to flag an .env variable instead? The use case being, we're doing a lot of exploration into models, complex scenes etc. and seeing how it performs in production is really valuable.