You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varwebpack=require('webpack');varngAnnotatePlugin=require('ng-annotate-webpack-plugin');module.exports={/// ... rest of configplugins: [newngAnnotatePlugin()]}
To modify the default plugin options or to add options for ng-annotate:
varwebpack=require('webpack');varngAnnotatePlugin=require('ng-annotate-webpack-plugin');module.exports={/// ... rest of configplugins: [newngAnnotatePlugin({add: true,// other ng-annotate options here})]}
Since version 0.4.0: for performance reasons, chunks where the name starts with vendors~ are not
annotated. To customize this behavior, set the option annotateChunk to a method that returns
true if a chunk should be annotated:
varwebpack=require('webpack');varngAnnotatePlugin=require('ng-annotate-webpack-plugin');module.exports={/// ... rest of configplugins: [newngAnnotatePlugin({add: true,annotateChunk: (chunk)=>!chunk.name||!chunk.name.startsWith("vendors~"),// other ng-annotate options here})]}
If you are looking for a loader instead of a plugin, use ng-annotate-loader instead
About
Webpack plugin that runs ng-annotate on your bundles