Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to remove from production build? #151

Open
lolmaus opened this issue Sep 28, 2021 · 2 comments
Open

Option to remove from production build? #151

lolmaus opened this issue Sep 28, 2021 · 2 comments

Comments

@lolmaus
Copy link

lolmaus commented Sep 28, 2021

This addon is so convenient for development, but I would like it to be unavailable in production and not constribute to distro size.

@BlueCutOfficial
Copy link
Member

BlueCutOfficial commented Aug 11, 2022

Just to be as accurate as possible: the idea would be to include/remove from the build depending on the target environment (not to be confused with the build type).

It is rather easy for a developer to switch feature flags values when working locally (though this addon allows to earn some time). The idea is the provided route can be accessed on some integration platform (on which a production build is deployed) so product owners or testers can configure the frontend flags.

I don't know what are the best resources to learn how to achieve this. ember-composable-helpers manages a whitelist of components to include and might be a reference. This post on StackOverflow also mentions babel-plugin-filter-imports (to remove imports in code) and ember-bootstrap (which also implements a component list).

@BlueCutOfficial
Copy link
Member

After discussing this with @GreatWizard, we believe it might not be a good idea to handle this a way that modifies the integrator application. We might instead register empty functions and empty components to decrease the build size on a given environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants