Support the ongoing development of Laravel.io →
posted 7 years ago
Configuration
Last updated 2 years ago.
0

Hi there, how did you get ng-annotate work with webpack? I mean, all steps you did. I tried to make it work and I couldn't. I'm trying to convert this example https://www.sitepoint.com/flexible-and-easily-maintainable-laravel-angular-material-apps/ using Larave Mix. Thanks :)

0

Hi Frankistan,

Sorry for the late response.

I use a custom webpack-config.js and added the following. Make sure to add it to the top, right under the variables:

let ngAnnotatePlugin = require('ng-annotate-webpack-plugin');

/*
 | Annotation for Angular
 */
module.exports = {
    plugins: [
        new ngAnnotatePlugin({
            add: true
        })
    ]
};

Obviously, you have to download the plugin via node. https://www.npmjs.com/package/ng-annotate-webpack-plugin

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jastend jastend Joined 6 Jan 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.