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

    I am unable to move or rename src folders and build SSR, why?

    Help
    2
    4
    66
    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.
    • B
      BabaYaga last edited by BabaYaga

      I did a simple rename of the assets folder to _assets and then placed my css folder in there so to access CSS the path is now:

      src/_assets/css/app.css

      When I run the SSR build command quasar build --mode ssr I get an error saying:

      ERROR in ./.quasar/server-entry.js
      Module not found: Error: Can't resolve 'src/css/app.css' in 'C:\mywebsite\.quasar'
       @ ./.quasar/server-entry.js 20:0-25
       @ multi ./.quasar/server-entry.js
      
      ERROR in ./.quasar/cient-entry.js
      Module not found: Error: Can't resolve 'src/css/app.css' in 'C:\mywebsite\.quasar'
       @ ./.quasar/client-entry.js 19:0-25
       @ multi ./.quasar/client-entry.js
      

      If I go into both files above, correct the error, and then run the build command again the same error occurs because it looks like it recreates the files from scratch and always puts src/css/app.css in instead of src/_assets/css/app.css

      Why is it doing this, and what are the rules on the folder names and structure? Am I bound to Quasar’s folder names and structure or can I customise them as I please?

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

        What’s the purpose of renaming the assets folder? Read this, if you haven’t already.

        https://quasar.dev/quasar-cli/cli-documentation/handling-assets#Regular-assets---%2Fsrc%2Fassets

        Scott

        1 Reply Last reply Reply Quote 0
        • B
          BabaYaga last edited by

          @s-molinari okay… but what if I just want my css/app.css folder to be within statics? How could I tell Quasar to look for the app.css file in src/statics/css/app.css instead of just in src/css/app.css ?

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

            I’m not certain what it is you are trying to do, so can’t say for sure. But, if you use the statics/ path to statics, then Quasar should take care of the rest.

            Scott

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