Inlyn Assets in Webpack

Kom ons probeer nou inlyn assets. Met so 'n instelling sal prente in base64 omgeskakel word. Kom ons probeer:

webpack.config.jsexport default {
  entry: './src/index.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve('dist'),
  },
  module: {
    rules: [
      {
        test: /\.png$/,
        type: 'asset/inline'
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin(),
  ],
};
Задание 1

Stel dit so in dat prente met uitbreiding .svg as inlyn assets behandel word. Toets jou instellings met 'n voorbeeld van enige prent.