@laravel-streams/mix-extension
v1.3.1
Published
Laravel Streams JS packages all use similar mix configurations.
Downloads
7
Readme
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 afterrequire
'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;
}