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

    Debugging SSR in VSCode, quasar.config.js build.devtool not passed to server webpack config

    Help
    1
    1
    382
    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
      jeanbon last edited by

      Hi, I’m working on a SSR app and I wanted to enable debugging in VS Code for the SSR process. (My code was failing before render…)

      After trying tons of things I found out that to debug SSR within VSCode, I needed to enable “inline-source-map” which I did through quasar.config.js. (Thanks to Les Harris who pointed me in the right direction.)

      But this was not enough, I did not manage to make it work until I forced devtool = ‘inline-source-map’ in “extendWebpack” (Thanks to zoao2 post for the clue).

      extendWebpack (cfg) {
             if (cfg.mode === 'development') {
                 cfg.devtool = isServer ? 'inline-source-map' : 'source-map'
             }
      ...
      }
      

      According to Les Harris post mentioned above, “source-map” is needed for the client. One could as well set quasar build prop as default and just deal with server in extendWebpack…

      If fact, after debugging “extendWebpack” I found out that the client config does get the value from build.devtool setup in quasar.config.js but the server config seems to ignore it and stays as “#source-map” .

      **Quasar.config.js **

      build: {
      ...
      devtool: 'inline-source-map'
      ...
      }
      

      Debug Client config at the start of "extendWebpack"

      { mode: 'development',
        devtool: 'inline-source-map',
        ...
        entry: { app: [ '/home/node/sandbox2/.quasar/client-entry.js' ] } }
      }
      

      Debug Server config at the start of "extendWebpack"

      { mode: 'development',
        devtool: '#source-map',
        ...
        entry: { app: [ '/home/node/sandbox2/.quasar/server-entry.js' ] } }
      }
      

      Note: When build.devtool is not set, client config devtool = “#cheap-module-eval-source-map” by default.

      I have 2 questions:

      1. What is the reason for not applying build/devtool to server webpack config devtool ?
      2. What is the purpose of the “#” in “#???source-map” ?

      Thanks for your help.

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