Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

farrrr/laravel-elixir-webpack-ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel-Elixir-Webpack-Ex

Laravel-Elixir webpack extension.

Install

nam install laravel-elixir-webpack-ex —-save

Usage

Simple Example

var elixir = require('laravel-elixir');
var gulp = require('gulp');

require('laravel-elixir-webpack-ex');

elixir(function(mix) {
  mix.webpack('entry.js', {
    module: {
      loaders: [
        { test: /\.css$/, loader: 'style!css' },
      ],
    },
  }, 'public/js', 'resources/assets/js');
});

public/js is output file path, resources/assets/js is assets baseDir, both all optional.

You can pass your webpack.config.js:

mix.webpack('entry.js', require('./webpack.config.js'));

Multiple Entry Points

You can pass entries array:

mix.webpack(['entry1.js', 'entry2.js', 'entry3.js'], { ...webpackOptions });

or Pass key-value Object in it:

mix.webpack({
  App: 'entry1.js',
  Backend: 'entry2.js',
  Dashboard: 'entry3.js',
}, {...webpackOptions });

like webpack entry option, it will produce App.js, Backend.js, Dashboard.js at output dir.

License

Copyright (c) 2015 Far Tseng Licensed under the MIT license.

About

Laravel elixir webpack extension

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •