Building in Production -> put to the Server
give an error: Vuex handler functions must not be anonymous. Resolve: npm cache clean --force npm install npm i npm@latest -g
This commit is contained in:
@@ -11,15 +11,11 @@
|
||||
"pwa": "NODE_OPTIONS=--max_old_space_size=4096 DEBUG=v8:* quasar dev -m pwa",
|
||||
"test:unit": "jest",
|
||||
"test:cover": "jest --coverage",
|
||||
"build": "quasar build",
|
||||
"build:pwa": "quasar build -m pwa",
|
||||
"build:ssr": "quasar build -m ssr",
|
||||
"build": "quasar build -m pwa",
|
||||
"build:clean": "quasar clean",
|
||||
"serve": "quasar serve ./dist/pwa-mat",
|
||||
"serve:ssr": "quasar serve ./dist/ssr-mat",
|
||||
"serve:coverage": "quasar serve test/coverage/lcov-report/ --cache 0 --port 8788",
|
||||
"deploy": "now dist/spa-mat",
|
||||
"deploy:ssr": "now dist/ssr-mat"
|
||||
"deploy": "now dist/pwa-mat"
|
||||
},
|
||||
"dependencies": {
|
||||
"quasar-extras": "^2.0.8",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
created() {
|
||||
//this.title = 'My Vue and CosmosDB Heroes App'
|
||||
console.info(process.env)
|
||||
// console.info(process.env)
|
||||
UserStore.mutations.autologin()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,14 +12,11 @@ const state: IGlobalState = {
|
||||
}
|
||||
|
||||
const b = storeBuilder.module<IGlobalState>('GlobalModule', state)
|
||||
const stateGetter = b.state()
|
||||
|
||||
// Getters
|
||||
namespace Getters {
|
||||
|
||||
const conta = b.read(function conta(state): number {
|
||||
return state.conta
|
||||
})
|
||||
const conta = b.read(state => state.conta , 'conta')
|
||||
|
||||
export const getters = {
|
||||
get conta() {
|
||||
@@ -51,6 +48,8 @@ namespace Actions {
|
||||
|
||||
}
|
||||
|
||||
const stateGetter = b.state()
|
||||
|
||||
// Module
|
||||
const GlobalModule = {
|
||||
get state() { return stateGetter()},
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import Vuex, { Store } from 'vuex'
|
||||
import Vue from 'vue'
|
||||
import {RootState} from '@store'
|
||||
import { getStoreBuilder } from 'vuex-typex'
|
||||
Vue.use(Vuex)
|
||||
|
||||
export const storeBuilder = getStoreBuilder<RootState>()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import Api from '@api'
|
||||
import { ISignupOptions, ISigninOptions, IUserState } from 'model'
|
||||
import { ILinkReg, IResult, IIdToken } from 'model/other'
|
||||
@@ -8,8 +7,6 @@ import router from '@router'
|
||||
import { serv_constants } from '../Modules/serv_constants'
|
||||
import { rescodes } from '../Modules/rescodes'
|
||||
|
||||
|
||||
|
||||
const bcrypt = require('bcryptjs')
|
||||
|
||||
|
||||
@@ -34,15 +31,15 @@ const stateGetter = b.state()
|
||||
|
||||
namespace Getters {
|
||||
|
||||
const lang = b.read(function lang(state): string {
|
||||
const lang = b.read(state => {
|
||||
if (state.lang !== '') {
|
||||
return state.lang
|
||||
} else {
|
||||
return process.env.LANG_DEFAULT
|
||||
}
|
||||
})
|
||||
}, 'lang')
|
||||
|
||||
const tok = b.read(function tok(state): string {
|
||||
const tok = b.read(state => {
|
||||
if (state.tokens) {
|
||||
if (typeof state.tokens[0] !== 'undefined') {
|
||||
return state.tokens[0].token
|
||||
@@ -52,7 +49,7 @@ namespace Getters {
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
})
|
||||
}, 'tok')
|
||||
|
||||
export const getters = {
|
||||
get lang() {
|
||||
|
||||
@@ -22,15 +22,3 @@ export { default as Api } from './Api'
|
||||
|
||||
const store: Store<RootState> = getStoreBuilder<RootState>().vuexStore()
|
||||
export default store
|
||||
|
||||
// export function createStore() {
|
||||
// const store: Store<RootState> = storeBuilder.vuexStore({
|
||||
// strict: DebugMode
|
||||
// })
|
||||
//
|
||||
// return store
|
||||
//
|
||||
// }
|
||||
// export default new Vuex.Store<RootState>({
|
||||
|
||||
// })
|
||||
|
||||
Reference in New Issue
Block a user