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

    babel-plugin-transform-imports v2 and quasar

    Show & Tell
    4
    4
    1016
    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.
    • P
      Psi last edited by

      I’ve upgraded to babel-plugin-transform-imports v2 and got some errors like:

      imports.js?ce64:168 Uncaught Error: Unknown import from Quasar: function Vue (options) {

      Reason: https://www.npmjs.com/package/babel-plugin-transform-imports#version-20-breaking-changes

      Solution: Slightly changed babel config:

      module.exports = {
        "presets": [
          "@vue/app"
        ],
        "plugins": [
          [
            "transform-imports",
            {
              "quasar": {
                "transform": require('quasar/dist/babel-transforms/imports.js'),
                "preventFullImport": true
              }
            }
          ]
        ]
      }
      

      Notice the require(). Hope this helps anyone 😉

      D 1 Reply Last reply Reply Quote 1
      • M
        mypbn last edited by

        thats good

        1 Reply Last reply Reply Quote 0
        • D
          dtalion @Psi last edited by

          @Psi
          it returns now:

          Unknown import from Quasar: function () {
          if (!called) {
          called = true;
          fn.apply(this, arguments);
          }
          }"

          1 Reply Last reply Reply Quote 0
          • G
            gaby_64 last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • First post
              Last post