Skip to content

Commit

Permalink
fix(plugins): inject precache manifest correctly (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier authored Mar 13, 2023
1 parent d089dda commit c0d172e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/config/plugin.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ module.exports = ({ env: webpackEnv, config, paths }) => {
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
// dhis2: Inject plugin static assets to the existing SW's precache manifest
process.env.NODE_ENV === 'production' &&
// dhis2: Inject plugin static assets to the existing SW's precache
// manifest. Don't need to do in dev because precaching isn't done
// in dev environments
isProduction &&
new WorkboxWebpackPlugin.InjectManifest({
swSrc: paths.shellBuildServiceWorker,
injectionPoint: 'self.__WB_PLUGIN_MANIFEST',
Expand Down

0 comments on commit c0d172e

Please sign in to comment.