Skip to content
代码片段 群组 项目
选择Git版本
  • 151edaee14eb6059448f5f3ac3f101131f3417d7
  • main-jh 默认 受保护
  • pre-main-jh 受保护
  • 18-3-stable-ee 受保护
  • master 受保护
  • 18-2-stable-jh-patch-8
  • 18-3-stable-jh-patch-4
  • 18-2-stable-ee 受保护
  • 18-4-stable-ee 受保护
  • 18-4-stable-jh-patch-2
  • license-bind-ha
  • 18-3-stable-jh 受保护
  • 18-4-stable-jh 受保护
  • 18-2-stable-jh 受保护
  • set-ai-endpoint-metadata-on-saas
  • 18-1-stable-ee 受保护
  • 18-4-stable-jh-prepare
  • feat-duo-i18n
  • 18-1-stable-jh 受保护
  • test-duo-mr
  • fix-pipeline-4301465
  • v18.2.8-ee 受保护
  • v18.3.4-ee 受保护
  • v18.4.2-ee 受保护
  • v18.3.3-jh 受保护
  • v18.4.1-jh 受保护
  • v18.2.7-jh 受保护
  • v18.2.7-ee 受保护
  • v18.3.3-ee 受保护
  • v18.4.1-ee 受保护
  • v18.4.0-jh 受保护
  • v18.4.0-ee 受保护
  • v18.4.0-rc43-ee 受保护
  • v18.4.0-rc42-ee 受保护
  • v18.3.2-jh 受保护
  • v18.1.6-jh 受保护
  • v18.2.6-jh 受保护
  • v18.1.6-ee 受保护
  • v18.2.6-ee 受保护
  • v18.3.2-ee 受保护
  • v18.3.1-jh 受保护
41 个结果

webpack.vendor.config.js

Blame
  • 用户头像
    John Skarbek authored and Vitaly Slobodin committed
    * Updates our use of mermaid to the latest available version to pick up
      various fixes and new features
    * Changelog of Mermaid itself: https://github.com/mermaid-js/mermaid/compare/9.1.3...v10.0.2
    
    Closes: https://gitlab.com/gitlab-org/gitlab/-/issues/393811
    
    Changelog: changed
    67ca1e06
    历史
    用户头像 67ca1e06
    代码所有者
    将用户和群组指定为特定文件更改的核准人。 了解更多。
    webpack.vendor.config.js 2.21 KiB
    const path = require('path');
    const webpack = require('webpack');
    const { YarnCheck } = require('yarn-check-webpack-plugin');
    const vendorDllHash = require('./helpers/vendor_dll_hash');
    
    const ROOT_PATH = path.resolve(__dirname, '..');
    
    const dllHash = vendorDllHash();
    const dllCachePath = path.join(ROOT_PATH, `tmp/cache/webpack-dlls/${dllHash}`);
    const dllPublicPath = `/assets/webpack/dll.${dllHash}/`;
    
    module.exports = {
      mode: 'development',
      resolve: {
        extensions: ['.js'],
        alias: {
          jquery$: 'jquery/dist/jquery.slim.js',
        },
      },
    
      // ensure output is not generated when errors are encountered
      bail: true,
    
      context: ROOT_PATH,
    
      entry: {
        vendor: [
          '@apollo/client/core',
          '@gitlab/at.js',
          'core-js',
          'dexie',
          'dompurify',
          'echarts',
          'jed',
          'jquery/dist/jquery.slim.js',
          'katex',
          'lodash',
          'mousetrap',
          'pikaday',
          'popper.js',
          'sortablejs/modular/sortable.esm.js',
          'source-map',
          'three',
          'vue',
          'vuex',
        ],
      },
    
      output: {
        path: dllCachePath,
        publicPath: dllPublicPath,
        filename: '[name].dll.bundle.js',
        chunkFilename: '[name].dll.chunk.js',
        library: '[name]_[hash]',
      },
    
      plugins: [
        new webpack.DllPlugin({
          path: path.join(dllCachePath, '[name].dll.manifest.json'),
          name: '[name]_[hash]',
        }),
        new YarnCheck({
          rootDirectory: ROOT_PATH,
          exclude: new RegExp(
            [
              /*
              chokidar has a newer version which do not depend on fsevents,
              is faster and only compatible with newer node versions (>=8)
    
              Their actual interface remains the same and we can safely _force_
              newer versions to get performance and security benefits.
    
              This can be removed once all dependencies are up to date:
              https://gitlab.com/gitlab-org/gitlab/-/issues/219353
              */
              'chokidar',
              // We are ignoring ts-jest, because we force a newer version, compatible with our current jest version
              'ts-jest',
            ].join('|'),
          ),
          forceKill: true,
        }),
      ],
    
      node: {
        fs: 'empty', // sqljs requires fs
        setImmediate: false,
      },
    
      devtool: 'cheap-module-source-map',
    };