nativescript-sentry icon indicating copy to clipboard operation
nativescript-sentry copied to clipboard

SentryModule.forRoot does not allow any dynamic configuration

Open jeremypele opened this issue 7 years ago • 0 comments

For angular aot requirements, a direct string would work correctly e.g => SentryModule.forRoot({ dsn: 'abc123' }),

but any const, function, getter would break the instanciation e.g => SentryModule.forRoot({ dsn: AppConfig.sentryDSN }),

Would be cool to have something like TranslateModule for instance where you can provide a factory

TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: translateLoaderFactory,
        deps: [Http],
      },
    }),

jeremypele avatar Jan 11 '18 15:01 jeremypele