druxt-router 0.29.0 → 0.30.0
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/package.json +3 -3
- package/templates/plugin.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "druxt-router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Drupal router for Nuxt, powered by the Drupal Decoupled Router module.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"templates"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"druxt": "^0.
|
|
45
|
+
"druxt": "^0.23.0",
|
|
46
46
|
"url-parse": "^1.5.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"drupal-jsonapi-params": "*"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"vue": "^2.7.
|
|
55
|
+
"vue": "^2.7.14",
|
|
56
56
|
"vuex": "^3.6.2"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
package/templates/plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DruxtRouter } from 'druxt-router'
|
|
2
2
|
|
|
3
|
-
export default (
|
|
3
|
+
export default ({ app }, inject) => {
|
|
4
4
|
const baseUrl = '<%= options.baseUrl %>'
|
|
5
5
|
const options = {}
|
|
6
6
|
|
|
@@ -24,6 +24,9 @@ export default (context, inject) => {
|
|
|
24
24
|
<% if (typeof options.axios === 'object') { %>
|
|
25
25
|
// Axios settings.
|
|
26
26
|
options.axios = <%= JSON.stringify(options.axios) %>
|
|
27
|
+
<% } else { %>
|
|
28
|
+
// Use the @nuxtjs/axios module Axios instance.
|
|
29
|
+
options.axios = app.$axios
|
|
27
30
|
<% } %>
|
|
28
31
|
|
|
29
32
|
const router = new DruxtRouter(baseUrl, options)
|