SSR, PWA, Webpack, and language choice

  • Hi all… I’m currently implementing SSR+PWA in a new application using Quasar/app 1.0.0-beta.9.

    I’ve set myself to use TypeScript for the SPA and SSR app portions of the application (that was wonderfully easy to do!), and would like to be able to do the same for the SSR server portion of the application (ssr-src/index.js and ssr-src/extension.js), or for the PWA (only custom-service-worker.js).

    As far as I can tell this isn’t currently possible for a few reasons, including some hardcoded file names, at least one external resource that is pulled in (../ssr), and that the Webpack configuration for the server side is focused on the app, using only a copy for the SSR portion . I can massage the configuration via extendWebpack and end up with a functional build, but there are additional issues that can’t be resolved in this manner.

    For PWA this can be considered a Workbox issue, but it also could be considered a Quasar issue in that there is, as far as I can tell, no way to use multiple Webpack configs. This may or may not be at least partly resolved in a future version of workbox-webpack-plugin

    I can do as I have done in the past to enable TypeScript for regular SPA apps, rolling my own build, but of course this precludes the use of the Quasar CLI tool, at least for this aspect of development.

    Is accommodating for this something that is already on the radar for a future version? Or is it worth putting in a feature request for?

  • Hi -we are currently working on a typescript app extension. You are welcome to test-drive it - and leave your comments at the repo issues:

  • @nothingismagick That’s wonderful, and certainly simplifies the task of adding TypeScript support to a project. I will be happy to use your extension, which already appears quite complete! Nicely done.

    However, it does not solve the use of typescript (or another language) for SSR and PWA. This is something the Quasar CLI project, at least in part, will have to provide support for.

  • we’re working on it. should work soon

  • Excellent! And merged even… nicely done.

Log in to reply