Yarn Dev Compiles multilevel folder structure

If There are more entry points then there is issue regarding long url for windows
Let say our entry points are like this

{
    'dev/body-content-50-50': [
      [],
      [
        'body-content-50-50.scss',
      ],
    ],
    'dev/accordion': [
      [],
      ['accordion-1a.scss'],
    ],
    'dev/content-with-image-50-50': [
      [
        'modules/content-with-image-50-50.js',
      ],
      [
        'content-with-image-50-50.scss',
      ],
    ],
    'dev/cta-banner-1': [
      [],
      ['cta-banner-1.scss'],
    ],
    'dev/leadspace-1': [
      [],
      ['leadspace-1.scss'],
    ],
    'dev/leadspace-2': [
      ['modules/leadspace-2.js'],
      ['leadspace-2.scss'],
    ],
    'dev/leadspace': [
      [
        'modules/leadspace.js',
        'modules/banner.js',
      ],
      ['leadspace.scss'],
    ],
    'dev/logo-billboard-1': [
      ['modules/banner.js'],
      [
        'logo-billboard-1.scss',
      ],
    ],
    'dev/quote-module': [
      ['modules/swiper.js'],
      [
        'quote-module.scss',
        'swiper.scss',
      ],
    ],
  }

Then the output of this shows

Is there any ways to prevent this issue on windows level
Or is there any ways to update that vendor long path

the path should be truncated if it would exceed the column count of stdout.

i don’t remember when that feature was added. i’m on @roots/bud 6.2.0.

you can fully override the way chunks are split with the build.optimization.splitChunks hook:

  bud.hooks.on('build.optimization.splitChunks', (options) => ({
      ...options,
      cacheGroups: {
        vendors: {
          test: bud.hooks.filter('pattern.modules'),
          priority: -10,
          reuseExistingChunk: true,
        },
        default: {
          minChunks: 2,
          priority: -20,
          reuseExistingChunk: true,
        },
      },
    }))
2 Likes