Open gyohng opened 1 month ago
I was looking into this with vite, and found that vite doesn't work either, but for a different reason due to iconSet resolution, which tries to take a subscript of null. Here are two minimal sample projects freshly created with the latest Quasar that demonstrate the problem.
The only change I made is uncommenting lang
and uncommenting iconSet
(and adding it to the extras list) in quasar.config.js
. If you don't trust the attached zip files, just making these changes in the config file for a fresh project achieves the same result.
For a project where ssg used to work before (webpack-based), right now when I run
quasar ssg generate
, I get the following error at the end:(I edited out the project path)
The site generated by the ssg extension tries to import
quasar/lang/en-GB.js
andquasar/icon-set/fontawesome-v6-pro.js
and fails with the above error.These files are present in autogenerated
./quasar-user-options.js
, and imported correctly via ESM import. They are also specified in quasar conf as:I'm not sure what SSG does differently from Quasar, but builds using SSR and other modes work just fine and do not cause this exception. At some point during the ssg generate process those js imports turn into require(...) calls.
I can patch it temporarily by removing
"type":"module",
from package.json that belongs to quasar, also replaceexport default {
withmodule.exports = {
in the quasar javascript files inside node_modules, but I wonder if there's something about the ssg build process that can be altered to make it work out of the box.