question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set settings in nuxt

See original GitHub issue

Hi, I’m currently working in a Nuxt project and I want your plugin to just store the login data, I’ve tried the follogin with not success:

// plugins/multiTabState.client.js

import createMultiTabState from 'vuex-multi-tab-state';

export default ({ store }) => {
  createMultiTabState({
      statesPaths: [
        'userLogged',
        'userDetails',
      ]
  })(store);
};

Without setting it works as expected, storing all my state variables, but setting some paths it just stop working, my store is the following:

// store/session.js
export const state = () => ({
   userLogged: false,
   userDetails: {},
   // A lot of variables
})

I’m using the multiple state variables to logout on all browser tabs when session expires, but I want the other data to keep locally instead of globally.

I hope you can help me.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jonalxhcommented, Jan 30, 2021

Hi @gabrielmbmb, thanks a lot, It worked.

1reaction
gabrielmbmbcommented, Jan 14, 2021

I’ll have to review this problem further. I hope to be able to give you a solution soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt configuration file
This option lets you configure various settings for the build step, including loaders , filenames , the webpack config and transpilation . nuxt.config.js...
Read more >
Nuxt Configuration Reference
This can be set at runtime by setting the NUXT_APP_BASE_URL environment variable. Example: NUXT_APP_BASE_URL=/prefix/ node .output/server/index.mjs
Read more >
nuxt.config - NuxtJS
nuxt.config.js · build. This option lets you configure various settings for the build step, including loaders , filenames , the webpack config and...
Read more >
How to set custom configuration for Nuxt.js generate task
You can change the publicPath property of nuxt build section on nuxt.config.js. But in this case running the nuxt application in development mode...
Read more >
Understanding the nuxt configuration options | Geek.I.Am
The Target property · The head property · The components property · The buildModules property · The modules property · The build property...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found