unable to make file-loader to work
See original GitHub issueExample webpackConfig part taken from my styleguide.config.js
webpackConfig: {
context: path.resolve(__dirname, ""),
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.(styl|stylus)$/,
use: [
'style-loader',
'css-loader',
{
loader: 'stylus-loader',
options: {
import: [
path.resolve(__dirname, "../app/src/assets/stylus/globals.styl"),
resolve("src/styles/styles.styl"),
]
}
}
]
},
{
test: /\.svg$/,
loader: "html-loader",
},
{
test: /\.(ico|jpg|png)$/,
loader: "file-loader",
},
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
appendTsSuffixTo: [/\.vue$/]
}
},
{
test: /\.tsx$/,
loaders: [
{
loader: "babel-loader"
},
{
loader: "ts-loader",
options: {
appendTsxSuffixTo: [/\.vue$/],
transpileOnly: true
}
}
]
},
]
},
plugins: [new VueLoaderPlugin()],
resolve: {
extensions: ['.ts', '.tsx', '.js', '.vue', '.vuex', '.json'],
alias: {
"@": path.resolve(__dirname, "../app/src"),
},
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Webpack url-loader or file-loader not working react app
I can see my file located in development build directory under subdirectory assets as I would expect. When running application on webopack dev ......
Read more >file-loader - webpack - JS.ORG
The file-loader resolves import / require() on a file into a url and emits ... asset (`rootContext`) or `context` option // To get...
Read more >Loading Fonts with webpack - Chris Courses
In this tutorial, I'll show you how to get fonts working with webpack and explain the minute details along the way to better...
Read more >can't resolve 'file-loader' | The AI Search Engine You Control
In your case, App.js is in src/ directory while header.js is in src/components . To import you would do import Header from './components/header'...
Read more >PGA900: File Loader: Verification failed: Values at ... - TI E2E
today I use uniflash download sW to PGA900 through XDS200 ... File Loader: Verification failed: Values at address 0x00000003 do not match ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I was able to find a solution. file-loader and url-loader both work. To load a file you need to pass webpack rule:
create script at eg.
loadImages.js. In this file you need to import every file:then pass this script in Vue Styleguidist config file option
require.Dunno if this was obvious. Hope this will help somebody in the future.
Tested lots of other suggested solutions from SO and github issues, but this way only seems to work.
The only thig styleguidist does is using your webpack config to load the components. So if ti works without styleguidist it shoudl work with as well.