Closed ycang89 closed 5 years ago
i have resolve this issue by add "publicPath"
{ test: /\.(eot|woff|woff2|ttf|svg|png|jpe?g|gif)(\?\S*)?$/, use: [ { loader: 'file-loader', options: { publicPath: '/public/assets/', name: '[name].[ext]' } } ] }
please check if this help.
tried to include an image in the page by
<img src={require('../../../../preview/preview.png')}/>
but it doesn't work in "npm run serve-dev mode" and "npm run serve-prod mode". The output path is wrong.