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

    How to config webpack config resolve extension in quasar config

    Framework
    2
    2
    267
    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.
    • F
      floyd last edited by

      Hi there I am totally new in front-end development world with Quasar.
      I see some code examples that while import something, sometime they use extension name but sometimes not.
      e.g.
      import DataService from ‘./service/DataService’
      import CourseList from ‘./component/CourseList’
      import App from ‘./App.vue’

      When should I use import with extension name (.vue or .js)?
      And I’ve googled some, look like there is a configuration that webpack use to resolve extension name.
      How to config this in quasar config?

      Original webpack config as below

      resolve: {
          extensions: ['.wasm', '.mjs', '.js', '.json']
        }
      

      Thanks in advance for pointing the way.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        If you are only looking for .vue and .js importing without the extension, it should work OOTB with Quasar. Anything else, you’d need the proper loader too, for instance for GraphQL files (.gql).

        Scott

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