Skip to content

No serializer registered for Warning #653

@childrentime

Description

@childrentime

Bug report

postcss-loader will emit warnning when some css has ambiguity. But it will cause unstoppable yellow warning in terminal. It is because postcss-loader custom defined a Waring object and emit it with this.emitWarning

<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|/Users/lianwenwu/work/demo/terser-react/custom-loader.js!/Users/lianwenwu/work/demo/terser-react/node_modules/css-loader/dist/cjs.js!/Users/lianwenwu/work/demo/terser-react/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!/Users/lianwenwu/work/demo/terser-react/node_modules/sass-loader/dist/cjs.js!/Users/lianwenwu/work/demo/terser-react/src/index.scss': No serializer registered for Warning
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 1 items } -> webpack/lib/ModuleWarning -> Warning

Actual Behavior

print waring in terminal even with stat: false

Expected Behavior

do not emit non-serializable object

How Do We Reproduce?

https://github.com/childrentime/webpack-cache-reproduce

Please paste the results of npx webpack info here, and mention other relevant information

  System:
    OS: macOS 13.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 226.13 MB / 16.00 GB
  Binaries:
    Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Safari: 16.4
  Packages:
    babel-loader: ^8.0.0 => 8.3.0 
    css-loader: ^6.7.4 => 6.7.4 
    postcss-loader: ^7.3.0 => 7.3.0 
    sass-loader: ^13.3.0 => 13.3.0 
    style-loader: ^3.3.3 => 3.3.3 
    terser-webpack-plugin: ^5.3.9 => 5.3.9 
    webpack: ^5.83.1 => 5.83.1 
    webpack-cli: ^5.1.1 => 5.1.1 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions