Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AngularとWebpackでAoTコンパイルするまでの話

puku0x
April 26, 2017

 AngularとWebpackでAoTコンパイルするまでの話

@ngtool/webpackのAoTpプラグインを使ってAngularアプリを高速化しましょう、というお話です。

puku0x

April 26, 2017
Tweet

More Decks by puku0x

Other Decks in Technology

Transcript

  1. AoTઃఆʢWebpackʣ const AotPlugin = require('@ngtools/webpack').AotPlugin; config.plugins.push( new AotPlugin({ tsConfigPath: helpers.root('tsconfig.aot.json'),

    entryModule: helpers.root('src', 'app', 'app.module#AppModule'), }) ); config.module.rules.push({ test: /\.ts$/, use: ['@ngtools/webpack'] }); ϓϥάΠϯ ϩʔμઃఆ
  2. AoTઃఆʢTypeScriptʣ { "angularCompilerOptions": { "genDir": "aot", "skipMetadataEmit": true }, "compilerOptions":

    { "target": "es5", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, UTDPOpHKTPOʹ
 "OHVMBS༻ͷઃఆ௥Ճ