./node_modules/ngx-joyride/assets/images/close.svg中的ngx-joyride中的错误

时间:2018-08-17 07:55:22

标签: node.js angular npm

当我进行构建时,ngx-joyride给我一个错误,即

ERROR in ./node_modules/ngx-joyride/assets/images/close.svg
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type."

<line x1="1" y1="24" | x2="24" y2="1",
@ ./node_modules/ngx-joyride/esm5/ngx-joyride.esm.js 1:17918-17955
@ ./dist/server/main.bundle.js
@ ./server.ts

1 个答案:

答案 0 :(得分:0)

  1. 首先使用此命令安装此svg-inline-loader “ npm install svg-inline-loader --save-dev”
  2. 然后在您的webpack-config.js文件中将此添加到模块中

    {         测试:/。svg $ /,         加载程序:“ svg-inline-loader”     }