Coder Social home page Coder Social logo

laravel-elixir-webpack-official's Introduction

Laravel Elixir Webpack Integration

This extension brings Webpack support to Laravel Elixir, version 6 and up.

Step 1: Install

npm install laravel-elixir-webpack-official --save-dev

Step 2: Usage

Similar to Browserify, the webpack method may be used to compile and bundle ECMAScript 2015 into plain JavaScript. This function accepts a file, relative to the resources/assets/js directory, and generates a single bundled file in the public/js directory:

elixir(function(mix) {
    mix.webpack('app.js');
});

To choose a different output or base directory, simply specify your desired paths as the second and third arguments, respectively.

elixir(function(mix) {
    mix.webpack('app.js', 'public/dist', 'app/assets/js');
});

This will compile app/assets/js/app.js to public/dist/app.js.

If you'd like to leverage more of Webpack's functionality, Elixir will read any webpack.config.js file in your project root, and factor its configuration into the build process. Alternatively, you may pass your Webpack-specific configuration as the fourth argument to mix.webpack().

laravel-elixir-webpack-official's People

Contributors

jeffreyway avatar tomcastleman avatar

Watchers

MK avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.