How to use the @roots/bud.bud.alias function in @roots/bud

To help you get started, we’ve selected a few @roots/bud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github roots / sage / bud.config.js View on Github external
// @ts-check
const {bud} = require('@roots/bud');

/**
 * Define project paths.
 */
bud
  .srcPath('resources/assets')
  .distPath('dist');

/**
 * Set webpack aliases.
 */
bud.alias({
  '@fonts':   bud.src('fonts'),
  '@images':  bud.src('images'),
  '@scripts': bud.src('scripts'),
  '@styles':  bud.src('styles'),
});

/**
 * Autoload common modules.
 */
bud.auto({
  jquery: ['$', 'window.jQuery'],
});

/**
 * Configure live reload.
 */