第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

使用 purgecss safelist 選項(xiàng)給出 UnhandledPromise

使用 purgecss safelist 選項(xiàng)給出 UnhandledPromise

慕桂英4014372 2023-10-14 19:10:22
我正在使用 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)
查看完整描述

1 回答

?
呼如林

TA貢獻(xiàn)1798條經(jīng)驗(yàn) 獲得超3個(gè)贊

使用替代方法(即使用配置文件)使其正常工作purgecss.config.js。


module.exports = {

  content: ['build/index.html', 'build/static/js/*.chunk.js'],

  css: ['build/static/css/*.chunk.css'],

  output: 'build/static/css/',

  safelist: [/^modal-/]

}

在package.json文件中


"scripts": {

     "postbuild": "purgecss --config ./purgecss.config.js",

     .....other scripts

 },


查看完整回答
反對(duì) 回復(fù) 2023-10-14
  • 1 回答
  • 0 關(guān)注
  • 106 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)