@symbo.ls/create 2.10.260 → 2.10.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -1
- package/package.json +2 -2
- package/router.js +3 -3
package/index.js
CHANGED
|
@@ -41,7 +41,7 @@ export const create = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExter
|
|
|
41
41
|
const snippets = { ...utils, ...utils.scratchUtils, ...(options.snippets || {}) }
|
|
42
42
|
const define = options.define || defaultDefine
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
const routerOptions = initRouter(App, options) // eslint-disable-line
|
|
45
45
|
const extend = applySyncDebug([App], options)
|
|
46
46
|
|
|
47
47
|
const domqlApp = DOM.create({
|
|
@@ -59,6 +59,7 @@ export const create = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExter
|
|
|
59
59
|
define,
|
|
60
60
|
registry,
|
|
61
61
|
emotion,
|
|
62
|
+
routerOptions,
|
|
62
63
|
document: doc
|
|
63
64
|
}
|
|
64
65
|
}, doc.body, key, {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.273",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "3c31d52ceaa8952aae3306e6d553ed3ddd8202b9",
|
|
6
6
|
"source": "index.js",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"dependencies": {
|
package/router.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { router as defaultRouter } from '@domql/router'
|
|
4
4
|
import { window } from '@domql/globals'
|
|
5
5
|
import { Link, RouterLink } from '@symbo.ls/uikit'
|
|
6
|
-
import { deepMerge } from '@domql/utils'
|
|
6
|
+
import { deepMerge, merge } from '@domql/utils'
|
|
7
7
|
|
|
8
8
|
const DEFAULT_ROUTING_OPTIONS = {
|
|
9
9
|
initRouter: true,
|
|
@@ -12,7 +12,7 @@ const DEFAULT_ROUTING_OPTIONS = {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const initRouter = (root, options) => {
|
|
15
|
-
let routerOptions = options.routerOptions || DEFAULT_ROUTING_OPTIONS
|
|
15
|
+
let routerOptions = merge(options.routerOptions || {}, DEFAULT_ROUTING_OPTIONS)
|
|
16
16
|
|
|
17
17
|
if (routerOptions === false) return
|
|
18
18
|
if (routerOptions === true) routerOptions = DEFAULT_ROUTING_OPTIONS
|
|
@@ -37,7 +37,7 @@ export const initRouter = (root, options) => {
|
|
|
37
37
|
|
|
38
38
|
injectRouterInLinkComponent(routerOptions)
|
|
39
39
|
|
|
40
|
-
return
|
|
40
|
+
return routerOptions
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export const popStateRouter = (root, options) => {
|