-
-
Notifications
You must be signed in to change notification settings - Fork 866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example of razzle with PWA? #1544
Comments
How can I merge this whit my current
|
You should install razzle canary. https://github.com/jaredpalmer/razzle/blob/canary/examples/with-heroku/README.md |
const { InjectManifest } = require("workbox-webpack-plugin");
module.exports = {
options: {
forceRuntimeEnvVars: ['HOST', 'PORT']
},
modifyWebpackConfig({
env: {
target,
dev,
},
webpackConfig,
webpackObject,
options: {
razzleOptions,
webpackOptions,
},
paths,
}) {
const appConfig = Object.assign({}, webpackConfig);
if (target === "web") {
appConfig.plugins.push(
new InjectManifest({ swDest: "sw.js", swSrc: "services.js" }),
);
}
// Do some stuff...
return appConfig;
},
}; If you figure this out, please report on your findings 😀 |
Ts is builtin in canary. |
I couldn't make |
Is there a working example of razzle with PWA? I know there is a plugin made with this intention, but I just cannot make it work, not sure if there aren't missing instructions there.
If someone could provide an example, it would be great!
The text was updated successfully, but these errors were encountered: