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
Copy file name to clipboardExpand all lines: packages/@ngtools/webpack/README.md
+1-28Lines changed: 1 addition & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Angular Ahead-of-Time Webpack Plugin
2
2
3
-
Webpack plugin that AoT compiles your Angular components and modules.
3
+
Webpack 4.0 plugin that AoT compiles your Angular components and modules.
4
4
5
5
## Usage
6
6
@@ -31,31 +31,6 @@ exports = { /* ... */
31
31
}
32
32
```
33
33
34
-
Angular version 2 and 4, use `AotPlugin`:
35
-
36
-
```typescript
37
-
import {AotPlugin} from'@ngtools/webpack'
38
-
39
-
exports= { /* ... */
40
-
module: {
41
-
rules: [
42
-
{
43
-
test:/\.ts$/,
44
-
loader: '@ngtools/webpack'
45
-
}
46
-
]
47
-
},
48
-
49
-
plugins: [
50
-
newAotPlugin({
51
-
tsConfigPath: 'path/to/tsconfig.json',
52
-
entryModule: 'path/to/app.module#AppModule',
53
-
sourceMap: true
54
-
})
55
-
]
56
-
}
57
-
```
58
-
59
34
The loader works with webpack plugin to compile your TypeScript. It's important to include both, and to not include any other TypeScript compiler loader.
60
35
61
36
## Options
@@ -65,8 +40,6 @@ The loader works with webpack plugin to compile your TypeScript. It's important
65
40
*`entryModule`. Optional if specified in `angularCompilerOptions`. The path and classname of the main application module. This follows the format `path/to/file#ClassName`.
66
41
*`mainPath`. Optional if `entryModule` is specified. The `main.ts` file containing the bootstrap code. The plugin will use AST to determine the `entryModule`.
67
42
*`skipCodeGeneration`. Optional, defaults to false. Disable code generation and do not refactor the code to bootstrap. This replaces `templateUrl: "string"` with `template: require("string")` (and similar for styles) to allow for webpack to properly link the resources.
68
-
*`typeChecking`. Optional, defaults to true. Enable type checking through your application. This will slow down compilation, but show syntactic and semantic errors in webpack. Only available in `AotPlugin`.
69
-
*`exclude`. Optional. Extra files to exclude from TypeScript compilation. Not supported with `AngularCompilerPlugin`.
70
43
*`sourceMap`. Optional. Include sourcemaps.
71
44
*`compilerOptions`. Optional. Override options in `tsconfig.json`.
0 commit comments