File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 48
48
"cookie" : " ^0.3.1" ,
49
49
"js-cookie" : " ^2.2.0" ,
50
50
"vue-i18n" : " ^8.11.2" ,
51
- "vue-i18n-extensions" : " ^0.2.1" ,
52
- "vue-template-compiler" : " ^2.6.10"
51
+ "vue-i18n-extensions" : " ^0.2.1"
53
52
},
54
53
"devDependencies" : {
55
54
"@babel/runtime" : " 7.4.4" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ const { COMPONENT_OPTIONS_KEY } = require('./constants')
3
3
4
4
const acorn = require ( 'acorn' )
5
5
const walker = require ( 'acorn-walk' )
6
+ // Must not be an explicit dependency to avoid version mismatch issue.
7
+ // See https://github.com/nuxt-community/nuxt-i18n/issues/297
6
8
const compiler = require ( 'vue-template-compiler' )
7
9
8
10
exports . extractComponentOptions = ( path ) => {
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ module.exports = function (userOptions) {
59
59
// Generate localized routes
60
60
const pagesDir = this . options . dir && this . options . dir . pages ? this . options . dir . pages : 'pages'
61
61
this . extendRoutes ( ( routes ) => {
62
+ // This import (or more specifically 'vue-template-compiler' in helpers/components.js) needs to
63
+ // be required only at build time to avoid problems when 'vue-template-compiler' dependency is
64
+ // not available (at runtime, when using nuxt-start).
62
65
const { makeRoutes } = require ( './helpers/routes' )
63
66
64
67
const localizedRoutes = makeRoutes ( routes , {
You can’t perform that action at this time.
0 commit comments