FrozenPandaz / ng-universal-demo

171 stars 54 forks source link

aot with universal #15

Open dknitrox opened 7 years ago

dknitrox commented 7 years ago

I'm trying to compile into a universal application, but I throw the following error

 import { OpaqueToken, NgModule } from '@angular/core';
                                                              ^^^^^^
SyntaxError: Unexpected token import

I know there is a thread of it even post a possible solution, but it has not worked for me

https://github.com/ngrx/store/issues/387

as I have configured the externals module in my webpack.config.js

externals: [ includeClientPackages(/@AngularClass|@angular|angular2-|ng2-|ng-|@ng-|angular-|ngrx|@ngrx|@Angular2|ionic|@Ionic|-angular2|-ng2|-ng/), nodeExternals() ] Compiling in jit, no error happens to me