im using the webpack CLI template.
Then I install https://kazupon.imtqy.com/vue-i18n/ with the installation of npm --save vue-i18n
In my main.js, I am importing and setting the locale to "en"
import Vue from 'vue' import VueI18n from 'vue-i18n' import App from './App' import router from './router' Vue.use(VueI18n) Vue.locale('en', {}) new Vue({ el: '.nwt-mm-app', router, template: '<App/>', components: { App } })
Exit to the console always says
Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_0_vue___default.a.locale is not a function at eval (eval at <anonymous> (app.js:802), <anonymous>:16:45) at Object.<anonymous> (app.js:802) at __webpack_require__ (app.js:660) at fn (app.js:84) at Object.<anonymous> (app.js:1176) at __webpack_require__ (app.js:660) at app.js:709 at app.js:712
Am I a little lost? Hello,
Marcus
source share