我正在使用 purgecss 從我的項(xiàng)目中刪除不必要的 css。purgecss --css static/css/*.chunk.css --content index.html static/js/*.chunk.js --output static/css/但不幸的是,它還刪除了我需要的一些 css 類(lèi),因此參考我嘗試使用安全列表選項(xiàng)來(lái)進(jìn)行一些例外的文檔purgecss --safelist [modal] --css static/css/*.chunk.css --content index.html static/js/*.chunk.js --output static/css/它給出了以此結(jié)尾的長(zhǎng)錯(cuò)誤at U.evaluateRule (/usr/local/lib/node_modules/purgecss/lib/purgecss.js:1:6585)at /usr/local/lib/node_modules/purgecss/lib/purgecss.js:1:9659(node:10023) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 593)
使用 purgecss safelist 選項(xiàng)給出 UnhandledPromise
慕桂英4014372
2023-10-14 19:10:22