vue-cli 打包文件报错

vue-cli 打包文件报错

报错代码如下

> canteen@1.0.0 build D:\桌面\workPlace\07.items\06..canteen
> node build/build.js

/ building for production...Error processing file: static/css/app.9e1b2591f3911ed3227be61dd300833e.css
(node:1908) UnhandledPromiseRejectionWarning: postcss-svgo: Error in parsing SVG: Unquoted attribute value
Line: 0
Column: 14
Char: \
(node:1908) 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(). (rejection id: 3)
(node:1908) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  • 也修改了 config/index.js 下面的 build
build: {
    // Template for index.html
    index: path.resolve(__dirname, '../dist/index.html'),

    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: './',

    /**
     * Source Maps
     */

    productionSourceMap: false,
    // https://webpack.js.org/configuration/devtool/#production
    devtool: '#source-map',

    // Gzip off by default as many popular static hosts such as
    // Surge or Netlify already gzip all static assets for you.
    // Before setting to `true`, make sure to:
    // npm install --save-dev compression-webpack-plugin
    productionGzip: false,
    productionGzipExtensions: ['js', 'css'],

    // Run the build command with an extra argument to
    // View the bundle analyzer report after build finishes:
    // `npm run build --report`
    // Set to `true` or `false` to always turn it on or off
    bundleAnalyzerReport: process.env.npm_config_report
  }

但是还是报错,有没有大佬支招

2个回答

你用的一些css样式不是自己写的,也不是通过npm 安装的,而里面却有svg,要改下

weixin_43965839
夜色不再 回复Insist_bin: 主要是改svg里面的一个属性,无法识别,你看下有那个提示的,如果太多的话,建议使用npm 安装
一年多之前 回复
Insist_bin
Insist_bin 要怎么更改呢,我用了 iconfont
一年多之前 回复

如果是iconfont的话 记忆直接在index.html里面直接引入即可

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问