我在 React 应用程序中使用 styleguidist,这是我的 styleguid.config.js 文件的代码:
\n\nmodule.exports = {\n webpackConfig: {\n module: {\n rules: [\n // Babel loader, will use your project\xe2\x80\x99s .babelrc\n {\n test: /\\.jsx?$/,\n exclude: /node_modules/,\n loader: \'babel-loader\'\n },\n // Other loaders that are needed for your components\n {\n test: /\\.css$/,\n loader: \'style-loader!css-loader?modules\'\n }\n ]\n }\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n\n现在我想在运行于http://localhost:6060 的styleguidist 服务器中显示条形码图像。\n我的 styleguidist readme.md 的代码
\n\n```jsx\nvar Macybarcode = require(\'../../../containers/assets/img/macy/barcode.png\');\nconst barcode_img = Macybarcode;\nconst barcode_no = "33527111690008";\n\n<BarcodeMacy1 imgString={barcode_img} lineString={barcode_no} paddingTop="20px" width="50%" height="40px" /> \n```\nRun Code Online (Sandbox Code Playgroud)\n\n但每当我尝试显示图像时,我的服务器都会出现以下错误:
\n\n …