Joaquín Sánchez

Results 1398 comments of Joaquín Sánchez

The new custom sw build has been included to fix vitepress builds, since pwa plugin was creating weird sw code. Same problem with sveltekit integration (now sveltekit build the sw)....

@nodegin on dev, the plugin doesn't build the sw, it's "build" by Vite (esbuild) removing ts annotations, you will need to resolve that dependency, try adding an alias. can you...

dev is working, checking build... ![imagen](https://user-images.githubusercontent.com/6311119/219133523-c933c1de-a349-4cdc-aa6f-1a21fb7e893c.png)

also working on build, you need to add an alias to resolve the library: ```ts // apps/core/vite.config.ts resolve: { alias: { '@repro/library': '../../../libs/library/src/index.ts', }, }, ``` ![imagen](https://user-images.githubusercontent.com/6311119/219140186-9d304064-a335-43a6-adf1-fe6d95a22e7c.png) ![imagen](https://user-images.githubusercontent.com/6311119/219139967-9994e12f-1802-4939-b354-7b6d6f30969e.png)

you can use this (import `defaultInjectManifestVitePlugins` adding ts plugin in `injectManifest.vitePlugins` option): ![imagen](https://user-images.githubusercontent.com/6311119/219306747-8da64d8d-1b1e-4c92-972e-6082fc57e8fe.png) ```ts // apps/core/vite.config.ts /// import { defineConfig } from 'vite'; import { VitePWA, defaultInjectManifestVitePlugins } from 'vite-plugin-pwa';...

@nodegin @pgsteven have you tested my previous suggestion? you can add the names of any plugin you have in Vite plugins.

Why do you need react in the sw? That option is to allow add plugins configured in your vite app in custom rollup buiild for your custom sw, you can...

Split it into 2 modules, one for your app and another for the sw

You can have a lot of modules, for your app just re-export everything on one module and in the sw import just another one re-exporting what sw needs. Ofc in...

@nodegin You only need to split it into 2 modules `@repro/library`, you don't need to change any line in your code base just the library: - move logic required by...