Steven
04/15/2023, 3:41 PMrequire
an svg that is in my resources
folder.
I have added id("io.github.turansky.kfc.webpack") _version_ "7.5.0"
to my build.gradle.kts
and now the svg can be found, but it cannot be loaded.
I get the following error message during the build:
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See <https://webpack.js.org/concepts#loaders>
Do I need to manually configure loaders for my svg? If so, any help with this would be appreciated.Steven
04/15/2023, 9:27 PMid("io.github.turansky.kfc.application")
instead of the kfc.webpack
and specifying kfc.webpack.run=true
in gradle.properties
OrfeasZ
04/15/2023, 11:45 PMwebpack.config.d
folder inside your project folder (next to your src
folder) and create a file-rules.js
file in there (call it whatever you want) and put something like this inside:
config.module.rules.push(
{
test: /\.svg$/,
use: {
loader: 'url-loader',
options: {
name: '[name].[ext]'
}
}
}
);
OrfeasZ
04/15/2023, 11:45 PMOrfeasZ
04/15/2023, 11:47 PMSteven
04/16/2023, 8:30 AM