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



  • 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?



  • 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



  • @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 ?



  • 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


Log in to reply