No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    spread operator in vuex not working with any presets

    Help
    babel presets quasar 1.4 vuex
    2
    3
    329
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jorgv last edited by

      I am trying to use vuex …mapGetters() function and always quasar dev throws the following error: “Unexpected token”

      I am using lastest version of quasar 1.4.1. After google it and try different kind of suggestions I couldn’t make it work.
      Here are the babel.conf.js combinations I tried without success.

        presets: [
          [
            '@quasar/babel-preset-app', {
              presetEnv: { corejs: 3 }
             }
          ],
          '@babel/preset-react',
        ],
        plugins: [
          '@babel/plugin-proposal-object-rest-spread',
        ],
      
        presets: [
          '@quasar/babel-preset-app',
          '@babel/preset-env',
        ],
        plugins: [
          '@babel/plugin-proposal-object-rest-spread',
        ],
      

      I appreciate your help.

      thanks

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by

        I dont think you need to add those in babel, are you sure you installed vuex in your project. Pls, Provide more info.

        1 Reply Last reply Reply Quote 0
        • J
          jorgv last edited by

          Hi @metalsadman thanks for answering,

          After you mentioned if I had vuex in the project I search more than I had it installed but I was importing the function wrong

           import { ...mapGetters } from 'vuex';
          

          I fixt the error by importing it right.

          thanks again and sorry

          1 Reply Last reply Reply Quote 0
          • First post
            Last post