Webpack loader to annotate angular applications. Generates a sourcemaps as well.
npm install --save-dev ng-annotate-loader
module: {
loaders: [
{
test: /src.*\.js$/,
use: [{ loader: 'ng-annotate-loader' }],
}
]
}
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
add: false,
map: false,
}
}
]
}
More about ng-annotate
parameters
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
plugin: ['ng-annotate-adf-plugin']
}
}
]
}
{
test: /src.*\.js$/,
use: [
{
loader: 'ng-annotate-loader',
options: {
ngAnnotate: 'my-ng-annotate-fork'
}
}
]
}
{
test: /src.*\.js$/,
use: [
{ loader: 'ng-annotate-loader' },
{ loader: 'babel-loader' },
]
},
Run on the root folder:
npm install
npm test