angular/aio/content/examples/angular-linker-plugin/webpack.config.mjs
Alan Agius 2f62a9a548 docs: improve consuming partial-Ivy code outside the Angular CLI (#44027)
With this change we add an example of how to consume the linker plugin and also clean up the parts of this section.

Closes #44026

PR Close #44027
2021-11-04 18:55:52 +00:00

26 lines
560 B
JavaScript

// #docplaster ...
// #docregion webpack-config
import linkerPlugin from '@angular/compiler-cli/linker/babel';
export default {
// #enddocregion webpack-config
// #docregion webpack-config
module: {
rules: [
{
test: /\.m?js$/,
use: {
loader: 'babel-loader',
options: {
plugins: [linkerPlugin],
compact: false,
cacheDirectory: true,
}
}
}
]
}
// #enddocregion webpack-config
// #docregion webpack-config
}
// #enddocregion webpack-config