how add workbox plugin in to razzle #1448
Answered
by
fivethreeo
behnam-maqsudi
asked this question in
Q&A
Replies: 1 comment
-
const { InjectManifest } = require("workbox-webpack-plugin");
module.exports = {
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;
},
};
`` |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fivethreeo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
❓Question
i wanna add
to my config how can i do this ?
and how add scss plugin with other custom configs ?
Beta Was this translation helpful? Give feedback.
All reactions