-
Notifications
You must be signed in to change notification settings - Fork 46
Feature/i18n/basic ssr implementation #200
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
Feature/i18n/basic ssr implementation #200
Conversation
const _ = require('lodash'); | ||
const cookie = require('cookie'); | ||
|
||
const DEFAULT_LOCALE = 'en-US'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps, it would be nice to have this and the code below in the config
What do you think about it?
ilc/server/tailor/factory.js
Outdated
const filterHeaders = require('./filter-headers'); | ||
const errorHandlingService = require('../errorHandler/factory'); | ||
const errorHandlerSetup = require('./error-handler'); | ||
const fragmentHooks = require('./fragment-hooks'); | ||
const ConfigsInjector = require('./configs-injector'); | ||
const processFragmentResponse = require('./process-fragment-response'); | ||
|
||
module.exports = function (cdnUrl, nrCustomClientJsWrapper = null) { | ||
module.exports = function (cdnUrl, nrCustomClientJsWrapper = null, registryService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess registryService
should be the first param because nrCustomClientJsWrapper
is null
by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moreover, imho it's better to use object(e.g {cdnUrl, nrCustomClientJsWrapper = null, registryService}
) here, since we have too many params and some of them are optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed args order. We can use obj syntax later IMO
No description provided.