module.exports = [
  {
    test: /\.svg$/i,
    use: [
      {
        loader: "@svgr/webpack",
        options: { svgoConfig: { plugins: ["preset-default"] } },
      },
    ],
  },
  {
    test: /\.ts$/,
    exclude: /node_modules/,
    use: {
      loader: "babel-loader",
      options: {
        presets: ["@babel/preset-env", "@babel/preset-typescript"],
      },
    },
  },
  {
    test: /\.js$/,
    include:
      /node_modules\/@bigbinary\/neeto-commons-frontend\/dist\/(cjs\/)?(v2\/)?initializers\/i18n/,
    use: { loader: "babel-loader", options: { plugins: ["preval"] } },
  },
  {
    test: /\.m?js$/,
    resolve: {
      fullySpecified: false, // allows webpack to ignore some package rules as the Strict EcmaScript Module mode.
    },
  },
  { test: /\.js$/, enforce: "pre", use: ["source-map-loader"] },
];
