Skip to content

Commit c0d172e

Browse files
authored
fix(plugins): inject precache manifest correctly (#792)
1 parent d089dda commit c0d172e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli/config/plugin.webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ module.exports = ({ env: webpackEnv, config, paths }) => {
187187
resourceRegExp: /^\.\/locale$/,
188188
contextRegExp: /moment$/,
189189
}),
190-
// dhis2: Inject plugin static assets to the existing SW's precache manifest
191-
process.env.NODE_ENV === 'production' &&
190+
// dhis2: Inject plugin static assets to the existing SW's precache
191+
// manifest. Don't need to do in dev because precaching isn't done
192+
// in dev environments
193+
isProduction &&
192194
new WorkboxWebpackPlugin.InjectManifest({
193195
swSrc: paths.shellBuildServiceWorker,
194196
injectionPoint: 'self.__WB_PLUGIN_MANIFEST',

0 commit comments

Comments
 (0)