1.3.1 • Published 2 years ago

@laravel-streams/mix-extension v1.3.1

Weekly downloads
124
License
MIT
Repository
github
Last release
2 years ago

Laravel Streams Mix Extension

Laravel Streams JS packages all use similar mix configurations.

This extension prevents the need to setup each webpack.mis.js file separately with some defaults.

Installation

# NPM
npm install --dev @laravel-streams/mix-extension
# YARN
yarn add -D @laravel-streams/mix-extension

Usage

  • Simply require the @laravel-streams/mix-extension right after require'ing `mix;
  • Add streams to the mix!
const mix = require('laravel-mix')
require('@laravel-streams/mix-extension')

mix
    .js('resources/js/index.js', 'js')
    .sass('resources/scss/index.scss', 'css')
    .streams({
        name: ['<yourvendorname>', '<yourpackagename>'],
        // for example
        name: ['streams', 'api'],
    })

Configuration

interface StreamsMixExtensionOptions {
    name: [ string, string ];
    ts?: {
        configFile?: string
        declarationDir?: string
        declaration?: boolean
    };
    tsConfig?: Partial<TSConfig>;
    alterBabelConfig?: boolean;
    combineTsLoaderWithBabel?: boolean;
}