Inlyn Assets in Webpack
Kom ons probeer nou inlyn assets. Met so 'n instelling sal prente in base64 omgeskakel word. Kom ons probeer:
export default {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve('dist'),
},
module: {
rules: [
{
test: /\.png$/,
type: 'asset/inline'
}
]
},
plugins: [
new HtmlWebpackPlugin(),
],
};
Stel dit so in dat prente met uitbreiding .svg
as inlyn assets behandel word.
Toets jou instellings met
'n voorbeeld van enige prent.