Last Updated: May 30, 2016
·
1.137K
· dfeddad

Use ngAnnotate with Laravel Elixir and Browserify without any additional Elixir extension

Make sure that you have browserify-ngannotate installed.

Update gulpfile.js and add ngAnnotate to the array of Browserify transformers.

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

var config = Elixir.config;

// Enable Browserify ngAnnotate transformer
config.js.browserify.transformers.push({
  "name": "browserify-ngannotate",
  "options": {}
});

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

That's it, no need for any extension.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

Angular apps often share the page with analytics and payment scripts that are not Angular modules. Those scripts execute on the same origin as the framework.

Security insights from Cside