<commit_before>const webpack = require('webpack');
const pkg = require('./package.json');
const withTM = require('next-plugin-transpile-modules');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const { findPages } = require('./docs/src/modules/utils/find');

const LANGUAGES = ['en', 'zh', 'ru', 'pt', 'fr', 'es'];

module.exports = {
  webpack: (config, options) => {
    // Alias @material-ui/core peer dependency imports form the following modules to our sources.
    config = withTM({
      transpileModules: ['notistack', 'material-ui-pickers'],
    }).webpack(config, options);

    const plugins = config.plugins.concat([
      new webpack.DefinePlugin({
        'process.env': {
          LIB_VERSION: JSON.stringify(pkg.version),
        },
      }),
    ]);

    if (process.env.DOCS_STATS_ENABLED) {
      plugins.push(
        // For all options see https://github.com/th0r/webpack-bundle-analyzer#as-plugin
        new BundleAnalyzerPlugin({
          analyzerMode: 'server',
          generateStatsFile: true,
          // Will be available at `.next/stats.json`
          statsFilename: 'stats.json',
        }),
      );
    }

    return Object.assign({}, config, {
      plugins,<commit_msg>[docs] Server side render the German version<commit_after>const webpack = require('webpack');
const pkg = require('./package.json');
const withTM = require('next-plugin-transpile-modules');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const { findPages } = require('./docs/src/modules/utils/find');

const LANGUAGES = ['en', 'zh', 'ru', 'pt', 'fr', 'es', 'de'];

module.exports = {
  webpack: (config, options) => {
    // Alias @material-ui/core peer dependency imports form the following modules to our sources.
    config = withTM({
      transpileModules: ['notistack', 'material-ui-pickers'],
    }).webpack(config, options);

    const plugins = config.plugins.concat([
      new webpack.DefinePlugin({
        'process.env': {
          LIB_VERSION: JSON.stringify(pkg.version),
        },
      }),
    ]);

    if (process.env.DOCS_STATS_ENABLED) {
      plugins.push(
        // For all options see https://github.com/th0r/webpack-bundle-analyzer#as-plugin
        new BundleAnalyzerPlugin({
          analyzerMode: 'server',
          generateStatsFile: true,
          // Will be available at `.next/stats.json`
          statsFilename: 'stats.json',
        }),
      );
    }

    return Object.assign({}, config, {
      plugins,
{'fraction_non_alphanumeric': 0.15326130452180872, 'fraction_numerical': 0.0008003201280512205, 'mean_word_length': 2.8580246913580245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3253190', 'n_tokens_mistral': 746, 'n_tokens_neox': 726, 'n_words': 164}