how to set up an inline svg with webpack

后端 未结 9 1907
感动是毒
感动是毒 2020-12-02 16:49

I am wondering how to set up an inline svg with webpack?

I am following the react-webpack-cookbook.

I have my webpack.config set up correc

9条回答
  •  情深已故
    2020-12-02 17:39

    Folks who use svg-inline-loader and who stuck with "Cannot find module" error try to install babel-plugin-inline-react-svg and add it to the babel plugins:

    "plugins": [
        ...
        ["inline-react-svg", {}]
    ],
    ...
    

提交回复
热议问题