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

    v0.16 __THEME__ is not defined

    Help
    2
    5
    605
    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.
    • E
      egocentrist last edited by egocentrist

      Sorry for my English.

      I need to redefine the display logic of the textarea QInput so that the minHeight of the field is equal to the height of the input text (not the height + 19px).

      Earlier (v0.15) I just copied the component (from /node_modules/quasar-framework/src/components/input ), and changed this method:
      QInputMod

      After upgrading to Quasar v0.16, i get white page and error in console:
      THEME is not defined error

      It is possible to repeat easier:
      alt text

      How i can fix it?

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by rstoenescu

        You need to add __THEME__ to env:
        quasar.conf > build > env: { __THEME__: JSON.stringify(ctx.themeName) }

        E 1 Reply Last reply Reply Quote 0
        • E
          egocentrist @rstoenescu last edited by egocentrist

          @rstoenescu said in v0.16 __THEME__ is not defined:

          quasar.conf > build > env: { THEME: JSON.stringify(ctx.themeName) }

          I added a line to quasar.conf.js, but this did not solve the problem.
          env and error
          As a temporary solution, i change 1st line of
          /node_modules/quasar-framework/src/components/icon/QIcon.js

          const prefix = process.env.__THEME__ === ‘mat’ ? ‘md’ : ‘ios’

          Now the error is not observed.

          I’m not sure if this is the right solution, in addition, when the Quasar is been updated, my change will be lost. What can I do about it?

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by rstoenescu

            I will add __THEME__ to the define list from CLI, so you won’t have problems when Quasar gets updated.

            E 1 Reply Last reply Reply Quote 0
            • E
              egocentrist @rstoenescu last edited by

              @rstoenescu Thank you so much for Quasar and help.

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