@@ -5,6 +5,32 @@ var alias = {
55 site : process . cwd ( ) + '/webapp' ,
66} ;
77
8+ /**
9+ * Suppresses "No serializer registered for ProvidedDependency" cache warnings.
10+ * These arise because ify-loader processes node_modules files that also receive
11+ * a ProvidedDependency injection from ProvidePlugin (for process/browser).
12+ * Webpack's filesystem cache can't serialize ProvidedDependency in that context,
13+ * but the build and runtime behaviour are unaffected - only the cache entry for
14+ * those modules is skipped.
15+ */
16+ class SuppressProvidedDependencyCacheWarnings {
17+ apply ( compiler ) {
18+ compiler . hooks . infrastructureLog . tap (
19+ 'SuppressProvidedDependencyCacheWarnings' ,
20+ ( origin , type , args ) => {
21+ if (
22+ origin === 'webpack.cache.PackFileCacheStrategy' &&
23+ type === 'warn' &&
24+ args . length > 0 &&
25+ String ( args [ 0 ] ) . includes ( 'ProvidedDependency' )
26+ ) {
27+ return true ; // returning true suppresses this log entry
28+ }
29+ }
30+ ) ;
31+ }
32+ }
33+
834module . exports = function configure ( additionalConfig ) {
935 return baseConfig . merge ( [
1036 {
@@ -42,6 +68,7 @@ module.exports = function configure(additionalConfig) {
4268 new baseConfig . webpack . ProvidePlugin ( {
4369 process : 'process/browser' ,
4470 } ) ,
71+ new SuppressProvidedDependencyCacheWarnings ( ) ,
4572 ] ,
4673
4774 // Map external libraries Wdk exposes so we can do things like:
0 commit comments