Open maouxu opened 1 year ago
Compiled with problems:X
WARNING in ./src/assets/iconfont/iconfont.css (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[0]!./node_modules/@tarojs/webpack5-runner/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-5.use[0]!./src/assets/iconfont/iconfont.css)
Module Warning (from ./node_modules/@tarojs/webpack5-runner/node_modules/postcss-loader/dist/cjs.js): Warning
(3:3) postcss-url: Image type is svg and link contains #. Postcss-url cant handle svg fragments. SVG file fully inlined. E:\project\nov_web_mp\src\assets\iconfont\iconfont.svg
WARNING in ./src/assets/iconfont/iconfont.css (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-4.use[0]!./node_modules/@tarojs/webpack5-runner/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-5.use[0]!./src/assets/iconfont/iconfont.css)
Module Warning (from ./node_modules/@tarojs/webpack5-runner/node_modules/postcss-loader/dist/cjs.js): Warning
(3:3) postcss-url: Image type is svg and link contains #. Postcss-url cant handle svg fragments. SVG file fully inlined. E:\project\nov_web_mp\src\assets\iconfont\iconfont.svg
相关平台
H5
浏览器版本: Microsoft Edge 版本 114.0.1823.43 (正式版本) (64 位) 使用框架: Vue 3
复现步骤
使用nutui icon的方案一 引入 iconfont,执行npm run build:h5 -- --watch,报错(3:3) postcss-url: Image type is svg and link contains #. Postcss-url cant handle svg fragments. SVG file fully inlined. E:\project\nov_web_mp\src\assets\iconfont\iconfont.svg
期望结果
可以正常编译
实际结果
编译报错(3:3) postcss-url: Image type is svg and link contains #. Postcss-url cant handle svg fragments. SVG file fully inlined. E:\project\nov_web_mp\src\assets\iconfont\iconfont.svg
环境信息
补充信息
在config.index.js中的 h5:{ postcss:{ url:{ config:{ filter: () => { return /^.*.(svg|png)$/; } } } } } 增加这个后还是报错