<commit_before>const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const ZipPlugin = require('zip-webpack-plugin');
const path = require('path');

const pkg = require('../package.json');
const { styles, languages } = require('./common');

const date = (new Date()).toISOString().replace(/:\d+\.\d+Z$/, 'Z');
const banner = `
Super simple WYSIWYG editor v${pkg.version}
https://summernote.org


Copyright 2013- <NAME> and contributors
Summernote may be freely distributed under the MIT license.

Date: ${date}
`;
const minBanner = `Summernote v${pkg.version} | (c) 2013- <NAME> and contributors | MIT license`;

module.exports = {
  mode: 'production',

  performance: {
    maxEntrypointSize: 512000,
    maxAssetSize: 512000,
    assetFilter: (name) => {
      return name.endsWith('.js');
    },
  },

  resolve: {
    roots: [path.resolve('./src')],
  },

  entry: Object.fromEntries([
    // entries for each style
    ...styles.map(style => 
      [`${style.target}`, `./src/styles/${style.id}/summernote-${style.id}.js`]
    ),
    // ... and for minimized
    ...styles.map(style => 
      [`${style.target}.min`, `./src/styles/${style.id}/summernote-${style.id}.js`]
    ),
    // entries for each language
    ...languages.map(lang => 
      [`lang/${lang}`, `./src/lang/${lang}.js`]
    ),
    // ... and for minimized
    ...languages.map(lang => 
      [`lang/${lang}.min`, `./src/lang/${lang}.js`]
    ),
  ]),

  output: {
    publicPath: '/',
    path: path.join(__dirname, '../dist'),
    libraryTarget: 'umd',
  },

  externals: {
    jquery: {
      root: 'jQuery',
      commonjs: 'jquery',
      commonjs2: 'jquery',
      amd: 'jquery',
    },
  },

  module: {
    rules: [
      {
        test: /\.js$/i,
        exclude: /node_modules/,
        use: [
          {
            loader: 'string-replace-loader',
            options: {
              search: '@@VERSION@@',
              replace: pkg.version,
            },
          }, {<commit_msg>fix:  fix issue with jquery import case<commit_after>const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const ZipPlugin = require('zip-webpack-plugin');
const path = require('path');

const pkg = require('../package.json');
const { styles, languages } = require('./common');

const date = (new Date()).toISOString().replace(/:\d+\.\d+Z$/, 'Z');
const banner = `
Super simple WYSIWYG editor v${pkg.version}
https://summernote.org


Copyright 2013- <NAME> and contributors
Summernote may be freely distributed under the MIT license.

Date: ${date}
`;
const minBanner = `Summernote v${pkg.version} | (c) 2013- <NAME> and contributors | MIT license`;

module.exports = {
  mode: 'production',

  performance: {
    maxEntrypointSize: 512000,
    maxAssetSize: 512000,
    assetFilter: (name) => {
      return name.endsWith('.js');
    },
  },

  resolve: {
    roots: [path.resolve('./src')],
  },

  entry: Object.fromEntries([
    // entries for each style
    ...styles.map(style => 
      [`${style.target}`, `./src/styles/${style.id}/summernote-${style.id}.js`]
    ),
    // ... and for minimized
    ...styles.map(style => 
      [`${style.target}.min`, `./src/styles/${style.id}/summernote-${style.id}.js`]
    ),
    // entries for each language
    ...languages.map(lang => 
      [`lang/${lang}`, `./src/lang/${lang}.js`]
    ),
    // ... and for minimized
    ...languages.map(lang =>
      [`lang/${lang}.min`, `./src/lang/${lang}.js`]
    ),
  ]),

  output: {
    publicPath: '/',
    path: path.join(__dirname, '../dist'),
    libraryTarget: 'umd',
  },

  externals: {
    jquery: {
      root: 'jquery',
      commonjs: 'jquery',
      commonjs2: 'jquery',
      amd: 'jquery',
    },
  },

  module: {
    rules: [
      {
        test: /\.js$/i,
        exclude: /node_modules/,
        use: [
          {
            loader: 'string-replace-loader',
            options: {
              search: '@@VERSION@@',
              replace: pkg.version,
            },
          }, {
{'fraction_non_alphanumeric': 0.19101123595505617, 'fraction_numerical': 0.009253139458030404, 'mean_word_length': 2.6060365369340746, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '4711101', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1436, 'n_words': 296}